<!DOCTYPE html>
<!--
     SPDX-License-Identifier: CC-BY-SA-4.0
     SPDX-FileCopyrightText: 2020 seL4 Project a Series of LF Projects, LLC.
-->
<!-- Page last generated 2025-02-20 03:16:15 +0000 -->
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>API Reference | seL4 docs</title>

    <!-- Our stylesheet and theme stylesheet.  Contains bootstrap. -->
    <link rel="stylesheet" href="/assets/css/style.css" type="text/css">
    <!-- Font awesome -->
    <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
    <!-- Pygments syntax highlighting  -->
    <link rel="stylesheet" href="/assets/css/highlighting/trac.css" type="text/css">
    <link rel="icon" type="image/x-icon" href="/assets/favicon.ico"><script defer data-domain="docs.sel4.systems"
	    src="https://analytics.sel4.systems/js/script.js"></script></head>

  <body class="container-fluid">

    



<header>
  <ul class="row menu">
    <li class="col-xs-12 col-md-2" >
            <a href="https://sel4.systems" class="skip-icon">
              <img class="img-responsive" src="/assets/logo-text-white.svg" alt="seL4 logo" />
            </a>
    </li>
    <li class="col-xs-12 col-md-10 menu">
      <nav aria-label="Banner links">
        <h2><a href="/Resources" />Resources</h2>
        <h2><a href="/processes" />Contributing</a></h2>
        <h2><a href="/projects" />Projects</h2>
        <h2><a href="/Tutorials" />Tutorials</h2>
        <iframe title="DuckDuckGo search bar" src="https://duckduckgo.com/search.html?site=docs.sel4.systems&prefill=Search%20sel4.systems" style="overflow:hidden;margin-bottom:10px; padding:0;height:40px;float:right;border-width: 0px"></iframe>
      </nav>
    </li>
  </ul>
  <div class="clear"></div>
  
<div class="breadcrumbs bootstrap hidden-sm-down">
  <nav class="sel-breadcrumb" aria-label="Breadcrumb" >
    <ol class=" list-unstyled" vocab="http://schema.org/" typeof="BreadcrumbList">
      
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/">
              <span property="name"><b>seL4 Docs</b></span>
            </a>
            <meta property="position" content="1" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/projects/">
              <span property="name"><b>Projects</b></span>
            </a>
            <meta property="position" content="2" />
        </li>
      
        

        

        <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <a property="item" typeof="WebPage" href="/projects/sel4/">
              <span property="name"><b>The seL4 microkernel</b></span>
            </a>
            <meta property="position" content="3" />
        </li>
      
        

        
          <li class="breadcrumb-item" property="itemListElement" typeof="ListItem">
            <span property="name">API Reference</span>
            <meta property="position" content="4" /></li>
          
    </ol>
  </nav>
  <nav class="sel-version" aria-label="Current Versions">
    <ol class="list-unstyled">
      <li class="list-unstyled text-right" style="margin-left:auto; padding:0rem 0rem;">
        Current versions:</li>
      <li class="list-unstyled text-right">
      <a href="/releases/sel4/13.0.0"><b>seL4-13.0.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/microkit/1.4.1"><b>microkit-1.4.1</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/camkes/camkes-3.11.0"><b>camkes-3.11.0</b></a></li>
      <li class="list-unstyled text-right">
      <a href="/releases/capdl/0.3.0"><b>capDL-0.3.0</b></a></li>
      </ol>
  </nav>
  <div class='clear'></div>
</div>


</header>

    <main>
      <div class="row">
  <div class="hidden-xs col-sm-4 col-md-3 col-lg-2">
    


<div class="sidebar">



      <ul class="nav nav-sidebar">
  
        <li class="">
          <a class="" href="/Resources.html">
            Resources
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/sel4/documentation.html">
            seL4 Documentation
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/sel4/frequently-asked-questions.html">
            seL4 FAQ
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/buildsystem/host-dependencies.html">
            Set up your machine
          </a>
        </li>
  
        <li class="">
          <a class="" href="/Hardware/">
            Supported platforms
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/available-user-components.html">
            Available components
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/roadmap.html">
            Roadmap
          </a>
        </li>
  
        <li class="">
          <a class="" href="/CommunityProjects.html">
            Community projects
          </a>
        </li>
  
        <li class="">
          <a class="" href="/releases/sel4">
            Release Notes
          </a>
        </li>
  
        <li class="active">
          <a class="" href="/projects/sel4/api-doc.html">
            libsel4 API
          </a>
        </li>
  
        <li class="">
          <a class="" href="https://sel4.systems/Info/Docs/seL4-manual-latest.pdf">
            Current Manual
          </a>
        </li>
  
        <li class="">
          <a class="" href="/projects/sel4/verified-configurations.html">
            Verified Configurations
          </a>
        </li>
  
      </ul>














</div>

  </div>
  <div class="api content col-sm-8 col-md-6 col-lg-7 main">
    <h1 id="api-reference">API Reference</h1>
<p><em>Note: This page is auto-generated from the libsel4 API</em></p>

<h2 id="system-calls">System Calls</h2>
<hr />

<h3 id="general-system-calls">General System Calls</h3>

<h3 id="send">Send</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_Send</code></p>

<p>Send to a capability.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">msgInfo</code></td>
      <td>The messageinfo structure for the IPC.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<h3 id="recv">Recv</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_Recv</code></p>

<p>Block until a message is received on an endpoint.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">src</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. The sender information is the badge of the endpoint capability that was invoked by the sender, or the notification word of the notification object that was signalled. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code> structure</p>

<h3 id="call">Call</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_Call</code></p>

<p>Call a capability.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">msgInfo</code></td>
      <td>The messageinfo structure for the IPC.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code> structure</p>

<h3 id="reply">Reply</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_Reply</code></p>

<p>Perform a send to a one-off reply capability stored when the thread was last called. Does nothing if there is no reply capability which can happen if the blocked thread was unblocked via an operation such as destroying it.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">msgInfo</code></td>
      <td>The messageinfo structure for the IPC.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<h3 id="non-blocking-send">Non-Blocking Send</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_NBSend</code></p>

<p>Perform a non-blocking send to a capability.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">msgInfo</code></td>
      <td>The messageinfo structure for the IPC.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<h3 id="reply-recv">Reply Recv</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_ReplyRecv</code></p>

<p>Perform a reply followed by a receive in one system call.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">msgInfo</code></td>
      <td>The messageinfo structure for the IPC.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. The sender information is the badge of the endpoint capability that was invoked by the sender, or the notification word of the notification object that was signalled. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code> structure</p>

<h3 id="non-blocking-recv">Non-Blocking Recv</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_NBRecv</code></p>

<p>Receive a message from an endpoint but do not block in the case that no messages are pending.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">src</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. The sender information is the badge of the endpoint capability that was invoked by the sender, or the notification word of the notification object that was signalled. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code> structure</p>

<h3 id="yield">Yield</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_Yield</code></p>

<p>Donate the remaining timeslice to a thread of the same priority.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<h3 id="signal">Signal</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_Signal</code></p>

<p>Signal a notification.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest</code></td>
      <td>The capability to be invoked.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> This is not a proper system call known by the kernel. Rather, it is a convenience wrapper which calls <a href="#send"><code class="language-plaintext highlighter-rouge">seL4_Send</code></a>. It is useful for signalling a notification.</p>

<h3 id="wait">Wait</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_Wait</code></p>

<p>Perform a receive on a notification object.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">src</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. The sender information is the badge of the endpoint capability that was invoked by the sender, or the notification word of the notification object that was signalled. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> This is not a proper system call known by the kernel. Rather, it is a convenience wrapper which calls <a href="#recv"><code class="language-plaintext highlighter-rouge">seL4_Recv</code></a>.</p>

<h3 id="poll">Poll</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_MessageInfo_t seL4_Poll</code></p>

<p>Perform a non-blocking receive on a notification object.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">src</code></td>
      <td>The capability to be invoked.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. The sender information is the badge of the endpoint capability that was invoked by the sender, or the notification word of the notification object that was signalled. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_MessageInfo_t</code> structure</p>

<p><strong>Description:</strong> This is not a proper system call known by the kernel. Rather, it is a convenience wrapper which calls <a href="#non-blocking-recv"><code class="language-plaintext highlighter-rouge">seL4_NBRecv</code></a>. It is useful for doing a non-blocking wait on a notification.</p>

<h3 id="debugging-system-calls">Debugging System Calls</h3>

<h3 id="put-char">Put Char</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugPutChar</code></p>

<p>Output a single char through the kernel.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">char</code></td>
      <td><code class="language-plaintext highlighter-rouge">c</code></td>
      <td>The character to output.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Use the kernel serial driver to output a single character. This is useful for debugging when a user level serial driver is not available.</p>

<h3 id="dump-scheduler">Dump Scheduler</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugDumpScheduler</code></p>

<p>Output the contents of the kernel scheduler.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Dump the state of the all TCB objects to kernel serial output. This system call will output a table containing:</p>
<ul>
  <li>Address: the address of the TCB object for that thread,</li>
  <li>Name: the name of the thread (if set),</li>
  <li>IP: the contents of the instruction pointer the thread is at,</li>
  <li>Priority: the priority of that thread,</li>
  <li>State : the state of the thread.</li>
</ul>

<h3 id="halt">Halt</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugHalt</code></p>

<p>Halt the system.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> This debugging system call will cause the kernel immediately cease responding to system calls. The kernel will switch permanently to the idle thread with interrupts disabled. Depending on the platform, the kernel may switch the hardware into a low-power state.</p>

<h3 id="snapshot">Snapshot</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugSnapshot</code></p>

<p>Output a capDL dump of the current kernel state.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> This debugging system call will output all of the capabilities in the current kernel using capDL.</p>

<h3 id="cap-identify">Cap Identify</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_Uint32 seL4_DebugCapIdentify</code></p>

<p>Identify the type of a capability in the current CSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">cap</code></td>
      <td>A capability slot in the current CSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> The type of capability passed in.</p>

<p><strong>Description:</strong> This debugging system call returns the type of capability in a capability slot in the current CSpace. The type returned is not a libsel4 type, but refers to an internal seL4 type. This can be looked up in a built kernel by looking for the (generated) <code class="language-plaintext highlighter-rouge">enum cap_tag</code>, type <code class="language-plaintext highlighter-rouge">cap_tag_t</code>.</p>

<h3 id="name-thread">Name Thread</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugNameThread</code></p>

<p>Name a thread.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">tcb</code></td>
      <td>A capability to the tcb object for the thread to name.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">const char *</code></td>
      <td><code class="language-plaintext highlighter-rouge">name</code></td>
      <td>The name for the thread.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Name a thread. This name will then be output by the kernel in all debugging output. Note that the max name length that can be passed to this function is limited by the number of chars that will fit in an IPC message (<code class="language-plaintext highlighter-rouge">seL4_MsgMaxLength</code> multiplied by the amount of chars that fit in a word). However the name is also truncated in order to fit into a TCB object. For some platforms you may need to increase <code class="language-plaintext highlighter-rouge">seL4_TCBBits</code> by 1 in a debug build in order to fit a long enough name.</p>

<h3 id="send-sgi-0-15">Send SGI 0-15</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugSendIPI</code></p>

<p>Sends arbitrary SGI.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">target</code></td>
      <td>The target core ID.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">unsigned</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>The SGI number (0-15).</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Send an arbitrary SGI (core-specific interrupt 0-15) to the specified target core.</p>

<h3 id="run">Run</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_DebugRun</code></p>

<p>Run a user level function in kernel mode.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">void(*)(void *)</code></td>
      <td><code class="language-plaintext highlighter-rouge">userfn</code></td>
      <td>The address in userspace of the function to run.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">void *</code></td>
      <td><code class="language-plaintext highlighter-rouge">userarg</code></td>
      <td>A single argument to pass to the function.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> This extremely dangerous function is for running benchmarking and debugging code that needs to be executed in kernel mode from userlevel. It should never be used in a release kernel. This works because the kernel can access all user mappings of device memory, and does not switch page directories on kernel entry.
 Unlike the other system calls in this section, <code class="language-plaintext highlighter-rouge">seL4_DebugRun</code> does not depend on the <code class="language-plaintext highlighter-rouge">DEBUG_BUILD</code> configuration option, but its own config variable <code class="language-plaintext highlighter-rouge">DANGEROUS_CODE_INJECTION</code>.</p>

<h3 id="benchmarking-system-calls">Benchmarking System Calls</h3>

<ol>
  <li>
    <p><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACEPOINTS</code>: Enable using tracepoints in the kernel and timing code.</p>
  </li>
  <li>
    <p><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_KERNEL_ENTRIES</code>: Keep track of information on kernel entries.</p>
  </li>
  <li>
    <p><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_UTILISATION</code>: Allow users to get CPU timing info for the system, threads and/or idle thread.</p>
  </li>
</ol>

<h3 id="reset-log">Reset Log</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_Error seL4_BenchmarkResetLog</code></p>

<p>Reset benchmark logging.</p>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_Error</code> error if the user-level log buffer has not been set by the user (<code class="language-plaintext highlighter-rouge">BENCHMARK_TRACEPOINTS</code>/<code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_KERNEL_ENTRIES</code>).</p>

<p><strong>Description:</strong> The behaviour of this system call depends on benchmarking mode in action while invoking this system call:</p>
<ol>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACEPOINTS</code>: resets the log index to 0,</li>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_KERNEL_ENTRIES</code>: as above,</li>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_UTILISATION</code>: resets benchmark and current thread start time (to the time of invoking this syscall), resets idle thread utilisation to 0, and starts tracking utilisation.</li>
</ol>

<h3 id="finalize-log">Finalize Log</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_Word seL4_BenchmarkFinalizeLog</code></p>

<p>Stop benchmark logging.</p>

<p><strong>Return value:</strong> The index of the final entry in the log buffer (if <code class="language-plaintext highlighter-rouge">BENCHMARK_TRACEPOINTS</code>/<code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_KERNEL_ENTRIES</code> are enabled).</p>

<p><strong>Description:</strong> The behaviour of this system call depends on benchmarking mode in action while invoking this system call:</p>
<ol>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACEPOINTS</code>: Sets the final log buffer index to the current index,</li>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_KERNEL_ENTRIES</code>: as above,</li>
  <li><code class="language-plaintext highlighter-rouge">BENCHMARK_TRACK_UTILISATION</code>: sets benchmark end time to current time, stops tracking utilisation.</li>
</ol>

<h3 id="set-log-buffer">Set Log Buffer</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_Error seL4_BenchmarkSetLogBuffer</code></p>

<p>Set log buffer.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">frame_cptr</code></td>
      <td>A capability pointer to a user allocated frame of seL4_LargePage size.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code> error if <code class="language-plaintext highlighter-rouge">frame_cptr</code> is not valid and couldn’t set the buffer.</p>

<p><strong>Description:</strong> Provide a large frame object for the kernel to use as a log-buffer. The object must not be device memory, and must be <code class="language-plaintext highlighter-rouge">seL4_LargePageBits</code> in size.</p>

<h3 id="null-syscall">Null Syscall</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkNullSyscall</code></p>

<p>Null system call that enters and exits the kernel immediately, for timing kernel traps in microbenchmarks.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Used to time kernel traps (in and out).</p>

<h3 id="flush-caches">Flush Caches</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkFlushCaches</code></p>

<p>Flush hardware caches.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Flush all possible hardware caches for this platform.</p>

<h3 id="flush-l1-caches">Flush L1 Caches</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkFlushL1Caches</code></p>

<p>Flush L1 caches.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cache_type</code></td>
      <td>L1 Cache Type to be flushed</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Flush L1 caches for this platform (currently only support for ARM). Allow to specify the cache type to be flushed (i.e. instruction cache only, data cache only and both instruction cache and data cache).</p>

<h3 id="get-thread-utilisation">Get Thread Utilisation</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkGetThreadUtilisation</code></p>

<p>Get utilisation timing information.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">tcb_cptr</code></td>
      <td>TCB cap pointer to a thread to get CPU utilisation for.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Get timing information for the system, requested thread and idle thread. Such information is written into the caller’s IPC buffer; see the definition of <code class="language-plaintext highlighter-rouge">benchmark_track_util_ipc_index</code> enum for more details on the data/format returned on the IPC buffer.</p>

<h3 id="reset-thread-utilisation">Reset Thread Utilisation</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkResetThreadUtilisation</code></p>

<p>Reset utilisation timing for a specific thread.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">tcb_cptr</code></td>
      <td>TCB cap pointer to a thread to get CPU utilisation for.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Reset the kernel’s timing information data (start time and utilisation) for a specific thread.</p>

<h3 id="dump-all-threads-utilisation">Dump All Threads Utilisation</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkDumpAllThreadsUtilisation</code></p>

<p>Print the current accumulated cycle count for every thread on the current node.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Uses kernel’s printf to print number of cycles on each line in the following format: thread_name,thread_cycles</p>

<h3 id="reset-all-threads-utilisation">Reset All Threads Utilisation</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC void seL4_BenchmarkResetAllThreadsUtilisation</code></p>

<p>Reset the accumulated cycle count for every thread on the current node.</p>

<p><strong>Return value:</strong> This method does not return anything.</p>

<p><strong>Description:</strong> Reset the cycle count for each thread to 0.</p>

<h3 id="x86-system-calls">X86 System Calls</h3>

<h3 id="vm-enter">VM Enter</h3>
<p><code class="language-plaintext highlighter-rouge">LIBSEL4_INLINE_FUNC seL4_Word seL4_VMEnter</code></p>

<p>Change current thread to execute from its bound VCPU.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word *</code></td>
      <td><code class="language-plaintext highlighter-rouge">sender</code></td>
      <td>The address to write sender information to. If the syscall returns due to receiving a notification on the bound notification then the sender information is the badge of the notification capability that was invoked. This parameter is ignored if <code class="language-plaintext highlighter-rouge">NULL</code>.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> <code class="language-plaintext highlighter-rouge">SEL4_VMENTER_RESULT_NOTIF</code> if a notification was received or <code class="language-plaintext highlighter-rouge">SEL4_VMENTER_RESULT_FAULT</code> if the guest mode execution faulted for any reason</p>

<p><strong>Description:</strong> Changes the execution mode of the current thread from normal TCB execution, to guest execution using its bound VCPU.</p>

<p>Invoking <code class="language-plaintext highlighter-rouge">seL4_VMEnter</code> is similar to replying to a fault in that updates to the registers can be given in the message, but unlike a fault no message info     is sent as the registers are not optional and the number that must be sent is fixed. The mapping of hardware register to message register is</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_CALL_EIP_MR</code> Address to start executing instructions at in the guest mode</li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_CALL_CONTROL_PPC_MR</code> New value for the Primary Processor Based VM Execution Controls</li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_CALL_CONTROL_ENTRY_MR</code> New value for the VM Entry Controls</li>
</ul>

<p>On return these same three message registers will be filled with the values at the point that the privileged mode ceased executing. If this function returns with <code class="language-plaintext highlighter-rouge">SEL4_VMENTER_RESULT_FAULT</code> then the following additional message registers will be filled out</p>
<ul>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_REASON_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_QUALIFICATION_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_INSTRUCTION_LEN_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_GUEST_PHYSICAL_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_RFLAGS_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_GUEST_INT_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_CR3_MR</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_EAX</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_EBX</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_ECX</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_EDX</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_ESI</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_EDI</code></li>
  <li><code class="language-plaintext highlighter-rouge">SEL4_VMENTER_FAULT_EBP</code></li>
</ul>

<h2 id="architecture-independent-object-methods">Architecture-Independent Object Methods</h2>
<hr />
<h3 id="sel4_cnode">seL4_CNode</h3>

<h4 id="cancel-badged-sends">Cancel Badged Sends</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_CancelBadgedSends</code></p>

<p>The cancel badged sends method is intended to allow for the reuse of badges by an
authority. When used with a badged endpoint capability it
will cancel any outstanding send operations for that endpoint and badge.
This operation has no effect on un-badged or other objects.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the capability will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the capability. Resolved from the root of the _service parameter.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the capability being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the capability does not have full rights to the Endpoint .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="copy">Copy</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Copy</code></p>

<p>Copy a capability, setting its access rights whilst doing so</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_depth</code></td>
      <td>Number of bits of dest_index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_root</code></td>
      <td>CPtr to the CNode that forms the root of the source CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_index</code></td>
      <td>CPtr to the source slot. Resolved from the root of the source CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_depth</code></td>
      <td>Number of bits of src_index to resolve to find the source slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>The rights inherited by the new capability.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The index or depth of the source or destination is invalid . Or, <code class="language-plaintext highlighter-rouge">src_root</code>  is a CPtr to a capability of the wrong type. Or, the source slot is empty.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the source capability cannot be derived .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">dest_depth</code>  or <code class="language-plaintext highlighter-rouge">src_depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The source capability cannot be derived .</td>
    </tr>
  </tbody>
</table>

<h4 id="delete">Delete</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Delete</code></p>

<p>Delete a capability</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the capability will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the capability. Resolved from the root of the _service parameter.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the capability being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="mint">Mint</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Mint</code></p>

<p>Copy a capability, setting its access rights and badge whilst doing so</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_depth</code></td>
      <td>Number of bits of dest_index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_root</code></td>
      <td>CPtr to the CNode that forms the root of the source CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_index</code></td>
      <td>CPtr to the source slot. Resolved from the root of the source CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_depth</code></td>
      <td>Number of bits of src_index to resolve to find the source slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>The rights inherited by the new capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">badge</code></td>
      <td>Badge or guard to be applied to the new capability. For badges on 32-bit platforms, the high 4 bits are ignored.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The index or depth of the source or destination is invalid . Or, <code class="language-plaintext highlighter-rouge">src_root</code>  is a CPtr to a capability of the wrong type. Or, the source slot is empty.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the source capability cannot be derived . Or, the badge or guard value is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">dest_depth</code>  or <code class="language-plaintext highlighter-rouge">src_depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The source capability cannot be derived .</td>
    </tr>
  </tbody>
</table>

<h4 id="move">Move</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Move</code></p>

<p>Move a capability</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_depth</code></td>
      <td>Number of bits of dest_index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_root</code></td>
      <td>CPtr to the CNode that forms the root of the source CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_index</code></td>
      <td>CPtr to the source slot. Resolved from the root of the source CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_depth</code></td>
      <td>Number of bits of src_index to resolve to find the source slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The index or depth of the source or destination is invalid . Or, <code class="language-plaintext highlighter-rouge">src_root</code>  is a CPtr to a capability of the wrong type. Or, the source slot is empty.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">dest_depth</code>  or <code class="language-plaintext highlighter-rouge">src_depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="mutate">Mutate</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Mutate</code></p>

<p>Move a capability, setting its guard in the process. This
operation is mostly useful for setting the guard of a CNode
capability without losing revokability of that CNode capability.
All other uses can be replaced by a combination of Mint and
Delete.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_depth</code></td>
      <td>Number of bits of dest_index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_root</code></td>
      <td>CPtr to the CNode that forms the root of the source CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_index</code></td>
      <td>CPtr to the source slot. Resolved from the root of the source CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_depth</code></td>
      <td>Number of bits of src_index to resolve to find the source slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">badge</code></td>
      <td>Guard to be applied to the new capability.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The index or depth of the source or destination is invalid . Or, <code class="language-plaintext highlighter-rouge">src_root</code>  is a CPtr to a capability of the wrong type. Or, the source slot is empty.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the guard value is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">dest_depth</code>  or <code class="language-plaintext highlighter-rouge">src_depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="revoke">Revoke</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Revoke</code></p>

<p>Delete all child capabilities of a capability</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the capability will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the capability. Resolved from the root of the _service parameter.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the capability being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="rotate">Rotate</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_Rotate</code></p>

<p>Given 3 capability slots - a destination, pivot and source - move the capability in the
pivot slot to the destination slot and the capability in the source slot to the pivot slot</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the destination slot will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_index</code></td>
      <td>CPtr to the destination slot. Resolved relative to _service. Must be empty unless it refers to the same slot as the source slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_depth</code></td>
      <td>Depth to resolve dest_index to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">dest_badge</code></td>
      <td>The new capdata for the capability that ends up in the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">pivot_root</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the pivot slot will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pivot_index</code></td>
      <td>CPtr to the pivot slot. Resolved relative to pivot_root. The resolved slot must not refer to the source or destination slots.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">pivot_depth</code></td>
      <td>Depth to resolve pivot_index to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pivot_badge</code></td>
      <td>The new capdata for the capability that ends up in the pivot slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_root</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the source slot will be found. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_index</code></td>
      <td>CPtr to the source slot. Resolved relative to src_root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">src_depth</code></td>
      <td>Depth to resolve src_index to.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>If the destination is not the same slot as the source and the destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The index or depth of the source, destination, or pivot is invalid . Or, <code class="language-plaintext highlighter-rouge">src_root</code>  or <code class="language-plaintext highlighter-rouge">pivot_root</code>  is a CPtr to a capability of the wrong type. Or, the source or pivot slot is empty.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the pivot is the same slot as the source or destination. Or, the guard value on the destination or pivot is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">dest_depth</code>, <code class="language-plaintext highlighter-rouge">src_depth</code>, or <code class="language-plaintext highlighter-rouge">pivot_depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h4 id="save-caller">Save Caller</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_CNode_SaveCaller</code></p>

<p>Save the reply capability from the last time the thread was called in the given CSpace so that it can be invoked later</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to the CNode at the root of the CSpace where the capability is to be saved. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the slot in which to save the capability. Resolved from the root of the _service parameter.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the slot being targeted.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_domainset">seL4_DomainSet</h3>

<h4 id="set">Set</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_DomainSet_Set</code></p>

<p>Change the domain of a thread.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DomainSet</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability allowing domain configuration.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">domain</code></td>
      <td>The thread’s new domain.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">thread</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">domain</code>  is greater than <code class="language-plaintext highlighter-rouge">CONFIG_NUM_DOMAINS</code>. Or, <code class="language-plaintext highlighter-rouge">thread</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_irqcontrol">seL4_IRQControl</h3>

<h4 id="get-irq-handler">Get IRQ Handler</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_Get</code></p>

<p>Create an IRQ handler capability</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>The IRQ that you want this capability to handle.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">root</code>, <code class="language-plaintext highlighter-rouge">index</code>, or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, on x86, an IOAPIC is being used.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">irq</code>  is invalid for the target architecture. Or, on x86, <code class="language-plaintext highlighter-rouge">irq</code>  is not in the ISA IRQ range. Or, <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">irq</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_irqhandler">seL4_IRQHandler</h3>

<h4 id="acknowledge">Acknowledge</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQHandler_Ack</code></p>

<p>Acknowledge the receipt of an interrupt and re-enable it</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQHandler</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The IRQ handler capability.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="clear">Clear</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQHandler_Clear</code></p>

<p>Clear the handler capability from the IRQ slot</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQHandler</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The IRQ handler capability.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-notification">Set Notification</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQHandler_SetNotification</code></p>

<p>Set the notification which the kernel will signal on interrupts
controlled by the supplied IRQ handler capability</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQHandler</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The IRQ handler capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">notification</code></td>
      <td>The notification which the IRQs will signal.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">notification</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">notification</code>  does not have the Write right .</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_schedcontext-mcs">seL4_SchedContext (MCS)</h3>

<h4 id="bind">Bind</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_SchedContext_Bind</code></p>

<p>Bind an object to a scheduling context. The object can be a notification object or a
thread.</p>

<p>If the object is a thread and the thread is in a runnable state and the scheduling
context has available budget, this will start the thread running.</p>

<p>If the object is a notification, when passive threads wait on the notification object and
a signal arrives, the passive thread will receive the scheduling context and possess it
until it waits on the notification object again.</p>

<p>This operation will fail for notification objects if the scheduling context is already
bound to a notification object, and for thread objects if the scheduling context is
already bound to a thread.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">cap</code></td>
      <td>Capability to a TCB or a notification object</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">cap</code>  is already bound to the same type of object. Or, <code class="language-plaintext highlighter-rouge">cap</code>  is a TCB in the blocked state and <code class="language-plaintext highlighter-rouge">_service</code>  is not schedulable.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">cap</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="consumed">Consumed</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_SchedContext_Consumed_t seL4_SchedContext_Consumed</code></p>

<p>Return the amount of time used by this scheduling context since this function was last called or a timeout exception triggered.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unbind-object">Unbind Object</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_SchedContext_UnbindObject</code></p>

<p>Unbind an object from a scheduling context. The object can be either a thread or a
notification.</p>

<p>If the thread being unbound is the thread that is bound to this scheduling context,
this will render the thread passive. However if the thread being
unbound received the scheduling context via scheduling context donation over IPC,
the scheduling context will be returned to the thread that it was originally bound to.</p>

<p>If the object is a notification and it is bound to the scheduling context, unbind it.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">cap</code></td>
      <td>Capability to a notification that is bound to the scheduling context or capability to a TCB that is bound to this scheduling context or has received it through scheduling context donation.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">cap</code>  is not bound to <code class="language-plaintext highlighter-rouge">_service</code>. Or, <code class="language-plaintext highlighter-rouge">cap</code>  is the current thread’s TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">cap</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unbind">Unbind</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_SchedContext_Unbind</code></p>

<p>Unbind any objects (threads or notification objects) from a scheduling context. This
will render the bound thread passive, see Section 6.1.5.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the current thread’s TCB is bound to <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="yield-to">Yield To</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_SchedContext_YieldTo_t seL4_SchedContext_YieldTo</code></p>

<p>If a thread is currently runnable and running on this scheduling context and the scheduling context has available budget, place it at the head of the scheduling queue.
If the caller is at an equal priority to the thread this will result in the thread being scheduled.
If the caller is at a higher priority the thread will not run until the threads priority is the highest priority in the system.
The caller must have a maximum control priority greater than or equal to the threads priority.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong></p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not bound to a TCB or is bound to the current thread’s TCB. Or, the target thread’s priority is greater than the current thread’s maximum controlled priority .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Capability to the scheduling context which is being operated on.</p>
<h3 id="sel4_schedcontrol-mcs">seL4_SchedControl (MCS)</h3>

<h4 id="configure-flags">Configure Flags</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_SchedControl_ConfigureFlags</code></p>

<p>Set the parameters of a scheduling context by invoking the scheduling control capability. If the scheduling context is bound to a currently running thread, the parameters will take effect immediately: that is the current budget will be increased or reduced by the difference between the new and previous budget and the replenishment time will be updated according to any difference in the period. This can result in active threads being post-poned or released depending on the nature of the parameter change and the state of the thread. Additionally, if the scheduling context was previously empty (no budget) but bound to a runnable thread, this can result in a thread running for the first time since it now has access to CPU time. This call will return seL4 Invalid Argument if the parameters are too small (smaller than the kernel WCET for this platform) or too large (will overflow the timer).</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to a scheduling control object.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_SchedContext</code></td>
      <td><code class="language-plaintext highlighter-rouge">schedcontext</code></td>
      <td>Capability to the scheduling context which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Time</code></td>
      <td><code class="language-plaintext highlighter-rouge">budget</code></td>
      <td>Timeslice in microseconds, when the budget expires the thread will be pre-empted.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Time</code></td>
      <td><code class="language-plaintext highlighter-rouge">period</code></td>
      <td>Period in microseconds, if equal to budget, this thread will be treated as a round-robin thread. Otherwise, sporadic servers will be used to assure the scheduling context does not exceed the budget over the specified period.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">extra_refills</code></td>
      <td>Number of extra sporadic replenishments this scheduling context should use. Ignored for round-robin threads.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">badge</code></td>
      <td>Identifier for this scheduling context. Delivered to timeout exception handler. Can be used to determine which scheduling context triggered the timeout.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">flags</code></td>
      <td>Bitwise OR’d set of seL4_SchedContextFlag.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">schedcontext</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">budget</code>  or <code class="language-plaintext highlighter-rouge">period</code>  or <code class="language-plaintext highlighter-rouge">extra_refills</code>  is too big or too small. Or, <code class="language-plaintext highlighter-rouge">budget</code>  is greater than <code class="language-plaintext highlighter-rouge">period</code>.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_tcb">seL4_TCB</h3>

<h4 id="bind-notification">Bind Notification</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_BindNotification</code></p>

<p>Binds a notification object to a <strong>TCB</strong></p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">notification</code></td>
      <td>Notification to bind.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">notification</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">notification</code>  is already bound. Or, <code class="language-plaintext highlighter-rouge">notification</code>  does not have Read rights to the Notification .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="configure-single-stepping">Configure Single Stepping</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_TCB_ConfigureSingleStepping_t seL4_TCB_ConfigureSingleStepping</code></p>

<p>Set or modify single stepping options for the target TCB. Subsequent calls to this
function overwrite previous configuration. Depending on your processor architecture,
this may or may not require the consumption of a hardware register.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">bp_num</code></td>
      <td>The API-ID of a target breakpoint. This ID will be a positive integer, with values ranging from 0 to seL4_NumHWBreakpoints - 1. This value is unused on AARCH64</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">num_instructions</code></td>
      <td>Number of instructions to step over before delivering a fault to the target thread’s fault endpoint. Setting this to 0 disables single-stepping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_TCB_ConfigureSingleStepping_t</code>: Struct that contains                 <code class="language-plaintext highlighter-rouge">seL4_Error error</code>, an seL4 API error value,                 <code class="language-plaintext highlighter-rouge">seL4_Bool bp_was_consumed</code>, a boolean which indicates whether or not the <code class="language-plaintext highlighter-rouge">bp_num</code>                 breakpoint ID that was passed to the function, was consumed in the setup of the single-stepping                 functionality: if this is <code class="language-plaintext highlighter-rouge">true</code>, the caller should not attempt to re-use <code class="language-plaintext highlighter-rouge">bp_num</code>                 until it has disabled the single-stepping functionality via a subsequent call to                 seL4_TCB_ConfigureSingleStepping with an <code class="language-plaintext highlighter-rouge">num_instructions</code> argument of 0.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the argument values are inappropriate for the target architecture.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The argument values are inappropriate for the target architecture.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="configure">Configure</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_Configure</code></p>

<p>Set the parameters of a TCB</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">fault_ep</code></td>
      <td>CPtr to the endpoint which receives IPCs when this thread faults. This capability is in the CSpace of the thread being configured.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root</code></td>
      <td>The new CSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root_data</code></td>
      <td>Optionally set the guard and guard size of the new root CNode. If set to zero, this parameter has no effect.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root</code></td>
      <td>The new VSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root_data</code></td>
      <td>Has no effect on x86 or ARM processors.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">buffer</code></td>
      <td>Location of the thread’s IPC buffer. Must be 512-byte aligned. The IPC buffer may not cross a page boundary.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">bufferFrame</code></td>
      <td>Capability to a page containing the thread’s IPC buffer.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>, <code class="language-plaintext highlighter-rouge">bufferFrame</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace_root</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">cspace_root_data</code>  is invalid. Or, <code class="language-plaintext highlighter-rouge">buffer</code>  is not aligned. Or, <code class="language-plaintext highlighter-rouge">bufferFrame</code>  is retyped from a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">bufferFrame</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="copy-registers">Copy Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_CopyRegisters</code></p>

<p>Copy the registers from one thread to another</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on. This is the destination TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">source</code></td>
      <td>Cap to the source TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">suspend_source</code></td>
      <td>The invocation should also suspend the source thread.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">resume_target</code></td>
      <td>The invocation should also resume the destination thread.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">transfer_frame</code></td>
      <td>Frame registers should be transferred.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">transfer_integer</code></td>
      <td>Integer registers should be transferred.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">arch_flags</code></td>
      <td>Architecture dependent flags. These have no meaning on x86, ARM, and RISC-V.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">source</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> In the context of this function, frame registers are those that are read, modified or preserved by a system call and integer registers are those that are not. Refer to the seL4 userland library source for specifics.</p>

<h4 id="get-breakpoint">Get Breakpoint</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_TCB_GetBreakpoint_t seL4_TCB_GetBreakpoint</code></p>

<p>Read a breakpoint or watchpoint’s current configuration.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">bp_num</code></td>
      <td>The API-ID of a target breakpoint. This ID will be a positive integer, with values ranging from 0 to seL4_NumHWBreakpoints - 1.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_TCB_GetBreakpoint_t</code>: Struct that contains                 <code class="language-plaintext highlighter-rouge">seL4_Error error</code>, an seL4 API error value,                 <code class="language-plaintext highlighter-rouge">seL4_Word vaddr</code>, the virtual address at which the breakpoint will currently                 be triggered;                 <code class="language-plaintext highlighter-rouge">seL4_Word type</code>, the type of operation which will currently trigger the                 breakpoint, whether instruction execution, or data access;                 <code class="language-plaintext highlighter-rouge">seL4_Word size</code>, integer value for the span-size of the breakpoint.                 Usually a power of two (1, 2, 4, etc.);                 <code class="language-plaintext highlighter-rouge">seL4_Word rw</code>, the access direction that will currently trigger the breakpoint,                 whether read, write, or both and                 <code class="language-plaintext highlighter-rouge">seL4_Bool is_enabled</code>, which indicates whether or not the breakpoint                 will currently be triggered if the match conditions are met.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The argument values are inappropriate for the target architecture.</td>
    </tr>
  </tbody>
</table>

<h4 id="read-registers">Read Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_ReadRegisters</code></p>

<p>Read a thread’s registers into the first <code class="language-plaintext highlighter-rouge">count</code> fields of a given
seL4_UserContext</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">suspend_source</code></td>
      <td>The invocation should also suspend the source thread.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">arch_flags</code></td>
      <td>Architecture dependent flags. These have no meaning on x86, ARM, and RISC-V.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">count</code></td>
      <td>The number of registers to read.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_UserContext *</code></td>
      <td><code class="language-plaintext highlighter-rouge">regs</code></td>
      <td>The structure to read the registers into.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is the current thread’s TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">count</code>  requested too few or too many registers.</td>
    </tr>
  </tbody>
</table>

<h4 id="resume">Resume</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_Resume</code></p>

<p>Resume a thread</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-breakpoint">Set Breakpoint</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetBreakpoint</code></p>

<p>Set or modify a thread’s breakpoints or watchpoints. Calls to this function
overwrite previous configurations for the target breakpoint. Do not use this
with seL4_SingleStep: the API will reject the call and return an error.
Instead, use seL4_TCB_ConfigureSingleStepping to configure single-stepping.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">bp_num</code></td>
      <td>The API-ID of a target breakpoint. This ID will be a positive integer, with values ranging from 0 to seL4_NumHWBreakpoints - 1.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>A virtual address which forms part of the match conditions for the triggering of the breakpoint.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">type</code></td>
      <td>One of: seL4_InstructionBreakpoint, which specifies that the breakpoint should occur on instruction execution at the specified vaddr or seL4_DataBreakpoint, which states that the breakpoint should occur on data access at the specified vaddr.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">size</code></td>
      <td>A positive integer indicating the trigger-span of the watchpoint. Must be zero when ‘type’ is seL4_InstructionBreakpoint.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">rw</code></td>
      <td>One of seL4_BreakOnRead, meaning the breakpoint will only be triggered on read-access; seL4_BreakOnWrite meaning the breakpoint will only be triggered on write-access, and seL4_BreakOnReadWrite meaning the breakpoint will be triggered on any access.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is not aligned to <code class="language-plaintext highlighter-rouge">size</code>  bytes.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">bp_num</code>, <code class="language-plaintext highlighter-rouge">size</code>, or <code class="language-plaintext highlighter-rouge">rw</code>  is not valid for the given <code class="language-plaintext highlighter-rouge">type</code>. Or, argument values are inappropriate for the target architecture. Or, <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The argument values are inappropriate for the target architecture.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-cpu-affinity">Set CPU Affinity</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetAffinity</code></p>

<p>Change a thread’s current CPU in multicore machine</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">affinity</code></td>
      <td>The thread’s new CPU to run.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">affinity</code>  is not a valid CPU number.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-ipc-buffer">Set IPC Buffer</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetIPCBuffer</code></p>

<p>Set a thread’s IPC buffer</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">buffer</code></td>
      <td>Location of the thread’s IPC buffer. Must be 512-byte aligned. The IPC buffer may not cross a page boundary.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">bufferFrame</code></td>
      <td>Capability to a page containing the thread’s IPC buffer.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">buffer</code>  is not aligned.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">bufferFrame</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">bufferFrame</code>  is retyped from a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">bufferFrame</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> See Sections threads and messageinfo</p>

<h4 id="set-maximum-controlled-priority">Set Maximum Controlled Priority</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetMCPriority</code></p>

<p>Change a thread’s maximum controlled priority</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">authority</code></td>
      <td>Capability to the TCB to use the MCP from when setting the MCP.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">mcp</code></td>
      <td>The thread’s new maximum controlled priority.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">authority</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">mcp</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-priority">Set Priority</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetPriority</code></p>

<p>Change a thread’s priority</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">authority</code></td>
      <td>Capability to the TCB to use the MCP from when setting the priority.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">priority</code></td>
      <td>The thread’s new priority.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">authority</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">priority</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-sched-params">Set Sched Params</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetSchedParams</code></p>

<p>Change a thread’s priority and maximum controlled priority.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">authority</code></td>
      <td>Capability to the TCB to use the MCP from when setting the priority and MCP.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">mcp</code></td>
      <td>The thread’s new maximum controlled priority.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">priority</code></td>
      <td>The thread’s new priority.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">authority</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">mcp</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>. Or, <code class="language-plaintext highlighter-rouge">priority</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-space">Set Space</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetSpace</code></p>

<p>Set the fault endpoint, CSpace and VSpace of a thread</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">fault_ep</code></td>
      <td>CPtr to the endpoint which receives IPCs when this thread faults. This capability is in the CSpace of the thread being configured.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root</code></td>
      <td>The new CSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root_data</code></td>
      <td>Optionally set the guard and guard size of the new root CNode. If set to zero, this parameter has no effect.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root</code></td>
      <td>The new VSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root_data</code></td>
      <td>Has no effect on x86 or ARM processors.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace_root</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">cspace_root_data</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">cspace_root</code>  or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-tls-base">Set TLS Base</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetTLSBase</code></p>

<p>Set the TLS base of the target TCB.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">tls_base</code></td>
      <td>The TLS base to set.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> An invocation for setting the Thread Local Storage (TLS) base address. This ensures that across all platforms, the TLSBase register is viewed as being completely mutable, just like all of the general purpose registers, even on platforms where modification is a privileged operation.</p>

<h4 id="suspend">Suspend</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_Suspend</code></p>

<p>Suspend a thread</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unbind-notification">Unbind Notification</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_UnbindNotification</code></p>

<p>Unbinds any notification object from a <strong>TCB</strong></p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not bound to a notification.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unset-breakpoint">Unset Breakpoint</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_UnsetBreakpoint</code></p>

<p>Disables a hardware breakpoint or watchpoint. The caller should assume that
the underlying configuration of the hardware registers has also been cleared.
Do not use this to clear single-stepping: the API will reject the call and
return an error. Instead, use seL4_TCB_ConfigureSingleStepping to disable
single-stepping.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">bp_num</code></td>
      <td>The API-ID of a target breakpoint. This ID will be a positive integer, with values ranging from 0 to seL4_NumHWBreakpoints - 1.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the argument values are inappropriate for the target architecture.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The argument values are inappropriate for the target architecture.</td>
    </tr>
  </tbody>
</table>

<h4 id="write-registers">Write Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_WriteRegisters</code></p>

<p>Set a thread’s registers to the first <code class="language-plaintext highlighter-rouge">count</code> fields of a given seL4_UserContext</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Bool</code></td>
      <td><code class="language-plaintext highlighter-rouge">resume_target</code></td>
      <td>The invocation should also resume the destination thread.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">arch_flags</code></td>
      <td>Architecture dependent flags. These have no meaning on x86, ARM, and RISC-V.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">count</code></td>
      <td>The number of registers to be set.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_UserContext *</code></td>
      <td><code class="language-plaintext highlighter-rouge">regs</code></td>
      <td>Data structure containing the new register values.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is the current thread’s TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_tcb-mcs">seL4_TCB (MCS)</h3>

<h4 id="configure-mcs">Configure (MCS)</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_Configure</code></p>

<p>Set the parameters of a TCB</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root</code></td>
      <td>The new CSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root_data</code></td>
      <td>Optionally set the guard and guard size of the new root CNode. If set to zero, this parameter has no effect.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root</code></td>
      <td>The new VSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root_data</code></td>
      <td>Has no effect on x86 or ARM processors.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">buffer</code></td>
      <td>Location of the thread’s IPC buffer. Must be 512-byte aligned. The IPC buffer may not cross a page boundary.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">bufferFrame</code></td>
      <td>Capability to a page containing the thread’s IPC buffer.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">buffer</code>  is not aligned.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>, <code class="language-plaintext highlighter-rouge">bufferFrame</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace_root</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">cspace_root_data</code>  is invalid. Or, <code class="language-plaintext highlighter-rouge">bufferFrame</code>  is retyped from a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">bufferFrame</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-sched-params-mcs">Set Sched Params (MCS)</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetSchedParams</code></p>

<p>Change a thread’s priority, maximum controlled priority, scheduling context
and fault handler.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">authority</code></td>
      <td>Capability to the TCB to use the MCP from when setting the priority and MCP.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">mcp</code></td>
      <td>The thread’s new maximum controlled priority.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">priority</code></td>
      <td>The thread’s new priority.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">sched_context</code></td>
      <td>Capability to the scheduling context that the TCB should run on. If the scheduling context is already bound to a notification or TCB that is not this TCB this operation will fail. Similarly, if this TCB is already bound to a scheduling context that is not this scheduling context, this will also fail.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">fault_ep</code></td>
      <td>CPtr to the endpoint which receives IPCs when this thread faults.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">sched_context</code>  is already bound. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is the current thread’s TCB. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is a TCB in the blocked state and <code class="language-plaintext highlighter-rouge">sched_context</code>  is not schedulable.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>, <code class="language-plaintext highlighter-rouge">authority</code>, <code class="language-plaintext highlighter-rouge">sched_context</code>, or <code class="language-plaintext highlighter-rouge">fault_ep</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">fault_ep</code>  does not have both Write rights and either Grant or GrantReply rights to the Endpoint .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">mcp</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>. Or, <code class="language-plaintext highlighter-rouge">priority</code>  is greater than the maximum controlled priority of <code class="language-plaintext highlighter-rouge">authority</code>.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-space-mcs">Set Space (MCS)</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetSpace</code></p>

<p>Set the fault endpoint, CSpace and VSpace of a thread</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">fault_ep</code></td>
      <td>CPtr to the endpoint which receives IPCs when this thread faults. On MCS this cap gets copied into the TCB.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root</code></td>
      <td>The new CSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cspace_root_data</code></td>
      <td>Optionally set the guard and guard size of the new root CNode. If set to zero, this parameter has no effect.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root</code></td>
      <td>The new VSpace root.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace_root_data</code></td>
      <td>Has no effect on x86 or ARM processors.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>, <code class="language-plaintext highlighter-rouge">cspace_root</code>, or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace_root</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">cspace_root_data</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">fault_ep</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">fault_ep</code>  does not have both Write rights and either Grant or GrantReply rights to the Endpoint .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">cspace_root</code>  or <code class="language-plaintext highlighter-rouge">vspace_root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="set-timeout-endpoint">Set Timeout Endpoint</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetTimeoutEndpoint</code></p>

<p>Set a thread’s timeout endpoint.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">timeout_fault_ep</code></td>
      <td>CPtr to the endpoint which receives IPCs when this thread triggers timeout faults. Can be null.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">timeout_fault_ep</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">timeout_fault_ep</code>  does not have both Write rights and either Grant or GrantReply rights to the Endpoint .</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Timeout exception messages will be delivered to this endpoint if it is not a null capability.</p>
<h3 id="sel4_untyped">seL4_Untyped</h3>

<h4 id="retype">Retype</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_Untyped_Retype</code></p>

<p>Retype an untyped object</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Untyped</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>CPtr to an untyped object.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">type</code></td>
      <td>The seL4 object type that we are retyping to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">size_bits</code></td>
      <td>Used to determine the size of variable-sized objects.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode at the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">node_index</code></td>
      <td>CPtr to the destination CNode. Resolved relative to the root parameter.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">node_depth</code></td>
      <td>Number of bits of node_index to translate when addressing the destination CNode.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">node_offset</code></td>
      <td>Number of slots into the node at which capabilities start being placed.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">num_objects</code></td>
      <td>Number of capabilities to create.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A capability exists in the destination window of the CNode.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">root</code>, <code class="language-plaintext highlighter-rouge">node_index</code>, or <code class="language-plaintext highlighter-rouge">node_depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">size_bits</code>  is too big or too small for the requested object type. Or, <code class="language-plaintext highlighter-rouge">type</code>  cannot be created from a device untyped . Or, the requested object <code class="language-plaintext highlighter-rouge">type</code>  does not exist.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_NotEnoughMemory</code></td>
      <td>The total size of the new objects exceeds the space available.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">num_objects</code>  do not fit in the destination CNode at <code class="language-plaintext highlighter-rouge">node_offset</code>. Or, <code class="language-plaintext highlighter-rouge">num_objects</code>  is greater than <code class="language-plaintext highlighter-rouge">CONFIG_RETYPE_FAN_OUT_LIMIT</code>. Or, <code class="language-plaintext highlighter-rouge">size_bits</code>  is too large.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Given a capability, <code class="language-plaintext highlighter-rouge">_service</code>, to an untyped object, creates <code class="language-plaintext highlighter-rouge">num_objects</code> of the requested type. Creates <code class="language-plaintext highlighter-rouge">num_objects</code> capabilities to the new objects starting at <code class="language-plaintext highlighter-rouge">node_offset</code> in the CNode specified by <code class="language-plaintext highlighter-rouge">root</code>, <code class="language-plaintext highlighter-rouge">node_index</code>, and <code class="language-plaintext highlighter-rouge">node_depth</code>.
 For variable-sized kernel objects, the <code class="language-plaintext highlighter-rouge">size_bits</code> argument is used to determine the size of objects to create. The relationship between <code class="language-plaintext highlighter-rouge">size_bits</code> and object size depends on the type of object being created.</p>

<h2 id="x86-specific-object-methods">x86-Specific Object Methods</h2>
<hr />

<h3 id="general-x86-object-methods">General x86 Object Methods</h3>
<h3 id="sel4_irqcontrol-1">seL4_IRQControl</h3>

<h4 id="get-io-apic-handler">Get I/O APIC Handler</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_GetIOAPIC</code></p>

<p>Create an IRQ handler capability for an interrupt from an IOAPIC.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioapic</code></td>
      <td>Zero based index of IOAPIC to get interrupt from, ordered the same as in ACPI tables</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pin</code></td>
      <td>IOAPIC pin that generates the interrupt.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">level</code></td>
      <td>Indicates whether the IOAPIC should be programmed to treat this interrupt as level triggered.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">polarity</code></td>
      <td>Indicates whether the IOAPIC should be programmed to treat this interrupt as high or low triggered</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vector</code></td>
      <td>CPU vector to deliver the interrupt to.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, an IOAPIC is not in use.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vector</code>, <code class="language-plaintext highlighter-rouge">ioapic</code>, or <code class="language-plaintext highlighter-rouge">pin</code>  is invalid. Or, <code class="language-plaintext highlighter-rouge">level</code>  or <code class="language-plaintext highlighter-rouge">polarity</code>  is not 0 or 1. Or, <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">vector</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h4 id="get-msi-handler">Get MSI Handler</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_GetMSI</code></p>

<p>Create an IRQ handler capability for an interrupt from an MSI.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pci_bus</code></td>
      <td>PCI bus ID of the device that will generate the interrupt.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pci_dev</code></td>
      <td>PCI device ID of the device that will generate the interrupt.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">pci_func</code></td>
      <td>PCI function ID of the device that will generate the interrupt.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">handle</code></td>
      <td>Value of the handle programmed into the data portion of the MSI.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vector</code></td>
      <td>CPU vector to deliver the interrupt to.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, an IOAPIC is not in use.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vector</code>, <code class="language-plaintext highlighter-rouge">pic_bus</code>, <code class="language-plaintext highlighter-rouge">pci_dev</code>, or <code class="language-plaintext highlighter-rouge">pci_func</code>  is invalid. Or, the <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">vector</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_tcb-1">seL4_TCB</h3>

<h4 id="set-ept-root">Set EPT Root</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_TCB_SetEPTRoot</code></p>

<p>Set the EPT root of a thread</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the TCB which is being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">eptpml4</code></td>
      <td>CPtr to an EPT PML4 object to act as the guest mode vspace root</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">eptpml4</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_asidcontrol">seL4_X86_ASIDControl</h3>

<h4 id="make-pool">Make Pool</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_ASIDControl_MakePool</code></p>

<p>Create an X86 ASID pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_ASIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The master ASIDControl capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Untyped</code></td>
      <td><code class="language-plaintext highlighter-rouge">untyped</code></td>
      <td>Capability to an untyped memory object that will become the pool. Must be 4K bytes.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability. Or, there are no more ASID pools available.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">untyped</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is not the exact size of an ASID pool object. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">untyped</code>  has been used to retype an object. Or, a copy of the <code class="language-plaintext highlighter-rouge">untyped</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Together with a capability to <code class="language-plaintext highlighter-rouge">Untyped Memory</code>, which is passed as an argument, create an <code class="language-plaintext highlighter-rouge">ASID Pool</code>. The untyped capability must represent a 4K memory object. This will create an ASID pool with enough space for 1024 VSpaces.</p>
<h3 id="sel4_x86_asidpool">seL4_X86_ASIDPool</h3>

<h4 id="assign">Assign</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_ASIDPool_Assign</code></p>

<p>Assign an ASID pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_ASIDPool</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The ASID pool which is being assigned to. Must not be full. Each ASID pool can contain 1024 entries.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>The page directory that is being assigned to an ASID pool. Must not already be assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>There are no more ASIDs available in <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is already assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Assigns an ASID to the VSpace associated with the <code class="language-plaintext highlighter-rouge">Page Directory</code> passed in as an argument.</p>
<h3 id="sel4_x86_eptpd">seL4_X86_EPTPD</h3>

<h4 id="map">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPD_Map</code></p>

<p>Map an EPT page directory.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPD</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PD being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">eptpml4</code></td>
      <td>Capability to the EPT root which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">gpa</code></td>
      <td>Guest physical address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">eptpml4</code>  at <code class="language-plaintext highlighter-rouge">gpa</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  does not have an EPTPDPT mapped at <code class="language-plaintext highlighter-rouge">gpa</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">eptpml4</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPD_Unmap</code></p>

<p>Unmap an EPT page directory.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPD</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PD being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_eptpdpt">seL4_X86_EPTPDPT</h3>

<h4 id="map-1">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPDPT_Map</code></p>

<p>Map an EPT page directory page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPDPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PDPT being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">eptpml4</code></td>
      <td>Capability to the EPT root which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">gpa</code></td>
      <td>Guest physical address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">eptpml4</code>  at <code class="language-plaintext highlighter-rouge">gpa</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">eptpml4</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-1">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPDPT_Unmap</code></p>

<p>Unmap an EPT page directory page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPDPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PDPT being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_eptpt">seL4_X86_EPTPT</h3>

<h4 id="map-2">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPT_Map</code></p>

<p>Map an EPT page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PT being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">eptpml4</code></td>
      <td>Capability to the EPT root which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">gpa</code></td>
      <td>Guest physical address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">eptpml4</code>  at <code class="language-plaintext highlighter-rouge">gpa</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  does not have an EPTPD mapped at <code class="language-plaintext highlighter-rouge">gpa</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">eptpml4</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace. Or, <code class="language-plaintext highlighter-rouge">eptpml4</code>  is not assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-2">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_EPTPT_Unmap</code></p>

<p>Unmap an EPT page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the EPT PT being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_iopagetable">seL4_X86_IOPageTable</h3>

<h4 id="map-3">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPageTable_Map</code></p>

<p>Map an IO page table into an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the I/O page table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">iospace</code></td>
      <td>The IOSpace to map the page table into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioaddr</code></td>
      <td>The address to map the page table at.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>All required page tables are already mapped in <code class="language-plaintext highlighter-rouge">iospace</code>  at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">iospace</code>  does not have a paging structure at the required level mapped at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">iospace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">iospace</code>  is not assigned to a PCI device. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in an IOSpace.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-3">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPageTable_Unmap</code></p>

<p>Unmap an IO page table from an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the I/O page table being operated on.The page table to unmap.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_ioport">seL4_X86_IOPort</h3>

<h4 id="in16">In16</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_IOPort_In16_t seL4_X86_IOPort_In16</code></p>

<p>Read 16 bits from an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to read from.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_IOPort_In16_t</code> structure</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, reading from <code class="language-plaintext highlighter-rouge">port</code>  and <code class="language-plaintext highlighter-rouge">port+1</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="in32">In32</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_IOPort_In32_t seL4_X86_IOPort_In32</code></p>

<p>Read 32 bits from an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to read from.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_IOPort_In32_t</code> structure</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, reading from ports <code class="language-plaintext highlighter-rouge">port</code>  through <code class="language-plaintext highlighter-rouge">port+3</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="in8">In8</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_IOPort_In8_t seL4_X86_IOPort_In8</code></p>

<p>Read 8 bits from an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to read from.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_IOPort_In8_t</code> structure</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, reading from <code class="language-plaintext highlighter-rouge">port</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="out16">Out16</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPort_Out16</code></p>

<p>Write 16 bits to an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to write to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">data</code></td>
      <td>Data to write to the IO port.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, writing to <code class="language-plaintext highlighter-rouge">port</code>  and <code class="language-plaintext highlighter-rouge">port+1</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="out32">Out32</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPort_Out32</code></p>

<p>Write 32 bits to an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to write to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">data</code></td>
      <td>Data to write to the IO port.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, writing to ports <code class="language-plaintext highlighter-rouge">port</code>  through <code class="language-plaintext highlighter-rouge">port+3</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="out8">Out8</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPort_Out8</code></p>

<p>Write 8 bits to an IO port.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An I/O Port capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">port</code></td>
      <td>The port to write to.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">data</code></td>
      <td>Data to write to the IO port.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, writing to <code class="language-plaintext highlighter-rouge">port</code>  is not authorized by the capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_ioportcontrol">seL4_X86_IOPortControl</h3>

<h4 id="issue">Issue</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_IOPortControl_Issue</code></p>

<p>Issue an IO port sub range.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPortControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Control capability for I/O ports.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">first_port</code></td>
      <td>First port of the range of the issued capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">last_port</code></td>
      <td>Last port of the range of the issued capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">last_port</code>  is less than <code class="language-plaintext highlighter-rouge">first_port</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>One or more ports in the requested range have already been issued.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_page">seL4_X86_Page</h3>

<h4 id="get-address">Get Address</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_Page_GetAddress_t seL4_X86_Page_GetAddress</code></p>

<p>Get the physical address of the underlying frame.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_IA32_Page_GetAddress_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word paddr</code>, which holds the physical address of the page,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-ept">Map EPT</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_Page_MapEPT</code></p>

<p>Map an extended page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_EPTPML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address at which to map page.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is not aligned to the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a paging structure at the required level mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped. Or, <code class="language-plaintext highlighter-rouge">_service</code>  has an unsupported page size.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-io">Map I/O</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_Page_MapIO</code></p>

<p>Map a page into an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">iospace</code></td>
      <td>The IOSpace that the frame is being mapped into</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioaddr</code></td>
      <td>The address that the frame is being mapped at.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">iospace</code>  at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">iospace</code>  does not have a sufficient number of IO Page Tables mapped at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>No rights were specified in <code class="language-plaintext highlighter-rouge">rights</code>. Or, the rights in the <code class="language-plaintext highlighter-rouge">_service</code>  capability do not include <code class="language-plaintext highlighter-rouge">rights</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">iospace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not a page of size 4 KiB. Or, <code class="language-plaintext highlighter-rouge">iospace</code>  is not assigned to a PCI device.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-4">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_Page_Map</code></p>

<p>Map a page into an address space or update the mapping attributes.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is not aligned to the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a paging structure at the required level mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in an IOSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in <code class="language-plaintext highlighter-rouge">vspace</code>  at a different virtual address. Or, <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a different VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Takes a VSpace capability, as an argument and installs a reference to the given <code class="language-plaintext highlighter-rouge">Page</code> in the lowest-level unmapped paging structure corresponding to the given address, or updates the mapping attributes if the page is already mapped at this address. If the required paging structures are not present this operation will fail, returning a seL4_FailedLookup error.</p>

<h4 id="unmap-4">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_Page_Unmap</code></p>

<p>Unmap a page.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Removes an existing mapping.</p>
<h3 id="sel4_x86_pagedirectory">seL4_X86_PageDirectory</h3>

<h4 id="get-status-bits">Get Status Bits</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_PageDirectory_GetStatusBits_t seL4_X86_PageDirectory_GetStatusBits</code></p>

<p>Retrieve the accessed and dirty bits of a page mapped into an address space.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.Capability to the address space to query.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address of the page to query</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_PageDirectory_GetStatusBits_t</code> structure.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  does not have a mapping at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-5">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PageDirectory_Map</code></p>

<p>Map a page directory.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a PDPT mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-5">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PageDirectory_Unmap</code></p>

<p>Unmap a page directory.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_pagetable">seL4_X86_PageTable</h3>

<h4 id="map-6">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PageTable_Map</code></p>

<p>Map a page table into an address space.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a Page Directory mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Takes a <code class="language-plaintext highlighter-rouge">PageDirectory</code> capability as an argument, and installs a reference to the invoked <code class="language-plaintext highlighter-rouge">PageTable</code> in a specified slot in the <code class="language-plaintext highlighter-rouge">PageDirectory</code>.</p>

<h4 id="unmap-6">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PageTable_Unmap</code></p>

<p>Unmap a page table from its address space and zero it out.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Removes the reference to the invoked <code class="language-plaintext highlighter-rouge">PageTable</code> from its containing <code class="language-plaintext highlighter-rouge">PageDirectory</code>.</p>
<h3 id="sel4_x86_vcpu">seL4_X86_VCPU</h3>

<h4 id="disable-io-port">Disable I/O Port</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_VCPU_DisableIOPort</code></p>

<p>Disable I/O port range in privileged execution</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">low</code></td>
      <td>Start of the I/O port range to disable</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">high</code></td>
      <td>Last I/O port in the range to disable</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Disable a range of I/O ports for direct access by the execution mode in the <code class="language-plaintext highlighter-rouge">VCPU</code>.</p>

<h4 id="enable-io-port">Enable I/O Port</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_VCPU_EnableIOPort</code></p>

<p>Enable I/O port range in guest execution</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_IOPort</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioPort</code></td>
      <td>I/O port capability whose authority is being delegating</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">low</code></td>
      <td>Start of the I/O port range to enable</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">high</code></td>
      <td>Last I/O port in the range to enable</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">ioPort</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">low</code>  or <code class="language-plaintext highlighter-rouge">high</code>  IO port exceeds the range authorized by <code class="language-plaintext highlighter-rouge">ioPort</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Enables a range of I/O ports for direct access by the execution mode in the <code class="language-plaintext highlighter-rouge">VCPU</code>. The requested port range must be a sub range of the provided I/O port capability.
 This also establishes a link between the provided I/O port capability and the <code class="language-plaintext highlighter-rouge">VCPU</code></p>

<h4 id="read-vmcs">Read VMCS</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_VCPU_ReadVMCS_t seL4_X86_VCPU_ReadVMCS</code></p>

<p>Read VMCS field from the hardware</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Field to give to <code class="language-plaintext highlighter-rouge">vmread</code> instruction</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_VCPU_ReadVMCS_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word value</code>, which holds the return result of the <code class="language-plaintext highlighter-rouge">vmread</code> instruction,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">field</code>  is invalid or unsupported.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Thin wrapper around the <code class="language-plaintext highlighter-rouge">vmread</code> instruction that is performed on the VMCS region that is part of the VCPU object. After validating that a legal field is requested the value of <code class="language-plaintext highlighter-rouge">vmread</code> is returned directly in the result.</p>

<h4 id="set-tcb">Set TCB</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_VCPU_SetTCB</code></p>

<p>Bind TCB to VCPU</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">tcb</code></td>
      <td>CPtr of the TCB to bind to</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">tcb</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Configures the one-to-one binding of a VCPU and TCB, overwriting any previous binding in both.</p>

<h4 id="write-registers-1">Write Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_VCPU_WriteRegisters</code></p>

<p>Set guest mode registers to the fields of a given <code class="language-plaintext highlighter-rouge">seL4_VCPUContext</code></p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_VCPUContext *</code></td>
      <td><code class="language-plaintext highlighter-rouge">regs</code></td>
      <td>Data structure containing the new register values.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Sets the guest mode registers, which is any registers not already part of the VMCS.</p>

<h4 id="write-vmcs">Write VMCS</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_VCPU_WriteVMCS_t seL4_X86_VCPU_WriteVMCS</code></p>

<p>Write VMCS field to the hardware</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Field to give to <code class="language-plaintext highlighter-rouge">vmwrite</code> instruction</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">value</code></td>
      <td>Value to write using <code class="language-plaintext highlighter-rouge">vmwrite</code> instruction</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_VCPU_WriteVMCS_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word writen</code>, which holds the final value written with the <code class="language-plaintext highlighter-rouge">vmwrite</code> instruction,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">field</code>  is invalid or unsupported.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Thin wrapper around the <code class="language-plaintext highlighter-rouge">vmwrite</code> instruction that is performed on the VMCS region that is part of the VCPU object. As well as validating that a legal field is requested, the value may be modified to ensure any bits that are fixed in the hardware are correct, and that any features required for kernel correctness are not disabled .
 The final value written to the hardware is returned and can be compared to the input parameter to determine what bits the kernel changed.</p>

<h3 id="ia32-specific-object-methods">IA32-Specific Object Methods</h3>
<p>No methods.</p>

<h3 id="x86_64-specific-object-methods">x86_64-Specific Object Methods</h3>
<h3 id="sel4_x86_pdpt">seL4_X86_PDPT</h3>

<h4 id="map-7">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PDPT_Map</code></p>

<p>Map a page directory page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PDPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the PDPT being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X64_PML4</code></td>
      <td><code class="language-plaintext highlighter-rouge">pml4</code></td>
      <td>Capability to the VSpace which will contain the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address at which to map page.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">pml4</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">pml4</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">pml4</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-7">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_X86_PDPT_Unmap</code></p>

<p>Unmap a page directory page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_PDPT</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the PDPT being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_x86_vcpu-1">seL4_X86_VCPU</h3>

<h4 id="read-msr">Read MSR</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_VCPU_ReadMSR_t seL4_X86_VCPU_ReadMSR</code></p>

<p>Read 64-bit specific MSR field from the hardware</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Field to give to <code class="language-plaintext highlighter-rouge">rdmsr</code> instruction</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_VCPU_ReadMSR_t</code> struct that contains a           <code class="language-plaintext highlighter-rouge">seL4_Word value</code>, which holds the return result of the           <code class="language-plaintext highlighter-rouge">rdmsr</code> instruction, and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<p><strong>Description:</strong> Thin wrapper around the <code class="language-plaintext highlighter-rouge">rdmsr</code> instruction that is performed on specific, needed registers. Certain registers might simply be cached and restored later.</p>

<h4 id="write-msr">Write MSR</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_X86_VCPU_WriteMSR_t seL4_X86_VCPU_WriteMSR</code></p>

<p>Write 64-bit specific MSR field to the hardware</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_X86_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>VCPU object to operate on</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Field to give to <code class="language-plaintext highlighter-rouge">wrsmr</code> instruction</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">value</code></td>
      <td>Value to write using <code class="language-plaintext highlighter-rouge">wrsmr</code> instruction</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_X86_VCPU_WriteMSR_t</code> struct that contains a           <code class="language-plaintext highlighter-rouge">seL4_Word writen</code>, which holds the final value written with the <code class="language-plaintext highlighter-rouge">wrmsr</code> instruction,           and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<p><strong>Description:</strong> Thin wrapper around the <code class="language-plaintext highlighter-rouge">wrmsr</code> instruction that is performed on specific, needed registers. As well as validating that a legal field is requested, the value may be modified to ensure any bits that are fixed in the hardware are correct, and that any features required for kernel correctness are not disabled .
 The final value written to the hardware is returned and can be compared to the input parameter to determine what bits the kernel changed.</p>

<h2 id="arm-specific-object-methods">ARM-Specific Object Methods</h2>
<hr />

<h3 id="general-arm-object-methods">General ARM Object Methods</h3>
<h3 id="sel4_arm_asidcontrol">seL4_ARM_ASIDControl</h3>

<h4 id="make-pool-1">Make Pool</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_ASIDControl_MakePool</code></p>

<p>Create an ASID Pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_ASIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The master ASIDControl capability being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Untyped</code></td>
      <td><code class="language-plaintext highlighter-rouge">untyped</code></td>
      <td>Capability to an untyped memory object that will become the pool. Must be 4K bytes.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability. Or, there are no more ASID pools available.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">untyped</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is not the exact size of an ASID pool object. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">untyped</code>  has been used to retype an object. Or, a copy of the <code class="language-plaintext highlighter-rouge">untyped</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Together with a capability to <code class="language-plaintext highlighter-rouge">Untyped Memory</code>, which is passed as an argument, create an <code class="language-plaintext highlighter-rouge">ASID Pool</code>. The untyped capability must represent a 4K memory object. This will create an ASID pool with enough space for 1024 VSpaces.</p>
<h3 id="sel4_arm_asidpool">seL4_ARM_ASIDPool</h3>

<h4 id="asid-pool-assign">ASID Pool Assign</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_ASIDPool_Assign</code></p>

<p>Assign an ASID Pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_ASIDPool</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The ASID pool which is being assigned to. Must not be full. Each ASID pool can contain 1024 entries.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>The VSpace that is being assigned to an ASID pool. Must not already be assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>There are no more ASIDs available in <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The ASID pool of <code class="language-plaintext highlighter-rouge">_service</code>  is no longer assigned.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is already assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Assigns an ASID to the VSpace passed in as an argument.</p>
<h3 id="sel4_arm_cb">seL4_ARM_CB</h3>

<h4 id="assign-vspace">Assign VSpace</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CB_AssignVspace</code></p>

<p>Assigning a VSpace to a context bank.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CB capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>The VSpace that is being assigned to a context bank. Must already has an assigned ASID.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is already assigned to a VSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<h4 id="cb-clear-fault">CB Clear Fault</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CB_CBClearFault</code></p>

<p>Clear the fault status of the context bank.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CB capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="cb-get-fault">CB Get Fault</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_ARM_CB_CBGetFault_t seL4_ARM_CB_CBGetFault</code></p>

<p>Get the fault status of the context bank.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CB capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_ARM_SMMU_CB_GetFault_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word status</code>, which holds the fault status of the context bank,                 <code class="language-plaintext highlighter-rouge">seL4_Word address</code>, which holds the faulty address,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="tlb-invalidate">TLB Invalidate</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CB_TLBInvalidate</code></p>

<p>Invalidating TLB entries used by the current ASID in this context bank.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CB capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to a VSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unassign-vspace">Unassign VSpace</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CB_UnassignVspace</code></p>

<p>Unassigning a VSpace to a context bank.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CB</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CB capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to a VSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_arm_cbcontrol">seL4_ARM_CBControl</h3>

<h4 id="get-cb">Get CB</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CBControl_GetCB</code></p>

<p>Create a CB capability.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CBControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CBControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">cb</code></td>
      <td>The CB that you want this capability to manage.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">cb</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A CB capability for <code class="language-plaintext highlighter-rouge">cb</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h4 id="tlb-invalidate-all">TLB Invalidate All</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_CBControl_TLBInvalidateAll</code></p>

<p>Invalidate all TLB entries.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_CBControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A CBControl capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_arm_iopagetable">seL4_ARM_IOPageTable</h3>

<h4 id="map-8">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_IOPageTable_Map</code></p>

<p>Map an IO page table into an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_IOPageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the I/O page table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_IOSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">iospace</code></td>
      <td>The IOSpace to map the page table into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioaddr</code></td>
      <td>Virtual address at which to map the page table.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>All required page tables are already mapped in <code class="language-plaintext highlighter-rouge">iospace</code>  at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">iospace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in an IOSpace.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-8">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_IOPageTable_Unmap</code></p>

<p>Unmap an IO page table from an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_IOPageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the I/O page table being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_arm_page">seL4_ARM_Page</h3>

<h4 id="clean-data">Clean Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_Clean_Data</code></p>

<p>Cleans the data cache out to RAM. The start and end are relative to the page being serviced.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start_offset</code></td>
      <td>The offset, relative to the start of the page inclusive.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end_offset</code></td>
      <td>The offset, relative to the start of the page exclusive.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The VSpace of <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not mapped in a VSpace. Or, if hypervisor support is configured, the requested range overlaps the kernel physical address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start_offset</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end_offset</code>. Or, <code class="language-plaintext highlighter-rouge">start_offset</code>  or <code class="language-plaintext highlighter-rouge">end_offset</code>  exceeds the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="clean-and-invalidate-data">Clean and Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_CleanInvalidate_Data</code></p>

<p>Clean and invalidates the cache range within the given page. The range will be flushed out to RAM.
The start and end offsets are relative to the page being serviced.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start_offset</code></td>
      <td>The offset, relative to the start of the page inclusive.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end_offset</code></td>
      <td>The offset, relative to the start of the page exclusive.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The VSpace of <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not mapped in a VSpace. Or, if hypervisor support is configured, the requested range overlaps the kernel physical address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start_offset</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end_offset</code>. Or, <code class="language-plaintext highlighter-rouge">start_offset</code>  or <code class="language-plaintext highlighter-rouge">end_offset</code>  exceeds the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="get-address-1">Get Address</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_ARM_Page_GetAddress_t seL4_ARM_Page_GetAddress</code></p>

<p>Get the physical address of the underlying frame.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_ARM_Page_GetAddress_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word paddr</code>, which holds the physical address of the page,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="invalidate-data">Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_Invalidate_Data</code></p>

<p>Invalidates the cache range within the given page. The start and end offsets are relative to the page being serviced
and should be aligned to a cache line boundary where possible.
An additional clean is performed on the outer cache lines if the start and end are
not aligned, to clean out the bytes between the requested and the cache line boundary.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start_offset</code></td>
      <td>The offset, relative to the start of the page inclusive.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end_offset</code></td>
      <td>The offset, relative to the start of the page exclusive.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The VSpace of <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not mapped in a VSpace. Or, if hypervisor support is configured, the requested range overlaps the kernel physical address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start_offset</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end_offset</code>. Or, <code class="language-plaintext highlighter-rouge">start_offset</code>  or <code class="language-plaintext highlighter-rouge">end_offset</code>  exceeds the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-io-1">Map I/O</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_MapIO</code></p>

<p>Map a page into an IOSpace.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_IOSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">iospace</code></td>
      <td>The IOSpace to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">ioaddr</code></td>
      <td>Virtual address at which to map page.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">iospace</code>  at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">iospace</code>  does not have a sufficient number of IO Page Tables mapped at <code class="language-plaintext highlighter-rouge">ioaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>No rights were specified in <code class="language-plaintext highlighter-rouge">rights</code>. Or, the rights in the <code class="language-plaintext highlighter-rouge">_service</code>  capability do not include <code class="language-plaintext highlighter-rouge">rights</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">iospace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not a page of size 4 KiB.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-9">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_Map</code></p>

<p>Map a page into an address space or update the mapping attributes.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping. Must be assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM Attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is not aligned to the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a paging structure at the required level mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in <code class="language-plaintext highlighter-rouge">vspace</code>  at a different virtual address. Or, <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a different VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Takes a VSpace capability as an argument and installs a reference to the given <code class="language-plaintext highlighter-rouge">Page</code> in the lowest-level unmapped paging structure corresponding to the given address, or updates the mapping attributes if the page is already mapped at this address. The page must not already be mapped through this capability in a different VSpace or at a different address; the page may be mapped in multiple VSpaces by copying the capability.</p>

<h4 id="unify-instruction">Unify Instruction</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_Unify_Instruction</code></p>

<p>Unify Instruction Cache. Cleans data lines to point of unification, invalidate
corresponding instruction lines to point of unification, then invalidates branch
predictors. The start and end offsets are relative to the page being
serviced.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start_offset</code></td>
      <td>The offset, relative to the start of the page inclusive.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end_offset</code></td>
      <td>The offset, relative to the start of the page exclusive.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The VSpace of <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not mapped in a VSpace. Or, if hypervisor support is configured, the requested range overlaps the kernel physical address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start_offset</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end_offset</code>. Or, <code class="language-plaintext highlighter-rouge">start_offset</code>  or <code class="language-plaintext highlighter-rouge">end_offset</code>  exceeds the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="unmap-9">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_Page_Unmap</code></p>

<p>Unmap a page.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Removes an existing mapping.</p>
<h3 id="sel4_arm_pagetable">seL4_ARM_PageTable</h3>

<h4 id="map-10">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageTable_Map</code></p>

<p>Map a page table into an address space.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>Capability to the VSpace which will contain the mapping. Must be assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM Attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists for this level in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr.</code></td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>On aarch64, <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a Page Directory mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Takes a VSpace capability as an argument, and installs a reference to the page table in the VSpace at the provided virtual address.</p>

<h4 id="unmap-10">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageTable_Unmap</code></p>

<p>Unmap a page table from its <code class="language-plaintext highlighter-rouge">Page Directory</code> and zero it out.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table being operated on.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>A copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Removes the reference to the invoked <code class="language-plaintext highlighter-rouge">Page Table</code> from its containing <code class="language-plaintext highlighter-rouge">Page Directory</code>.</p>
<h3 id="sel4_arm_sid">seL4_ARM_SID</h3>

<h4 id="bind-cb">Bind CB</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_SID_BindCB</code></p>

<p>Binding a context bank to a stream ID.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SID</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A SID capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">cb</code></td>
      <td>The CB that is being binded to a stream ID. Must already has an assigned vspace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is already bound to a context bank.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">cb</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">cb</code>  is not assigned to a VSpace.</td>
    </tr>
  </tbody>
</table>

<h4 id="unbind-cb">Unbind CB</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_SID_UnbindCB</code></p>

<p>Unbinding a context bank from a stream ID.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SID</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A SID capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not bound to a context block.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_arm_sidcontrol">seL4_ARM_SIDControl</h3>

<h4 id="clear-fault">Clear Fault</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_SIDControl_ClearFault</code></p>

<p>Clear the fault status of the SMMU.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A SIDControl capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="get-fault">Get Fault</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_ARM_SIDControl_GetFault_t seL4_ARM_SIDControl_GetFault</code></p>

<p>Get the fault status of the SMMU.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A SIDControl capability. This gives you the authority to make this call.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_ARM_SMMU_GetFault_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word status</code>, which holds the global fault status of the SMMU,                 <code class="language-plaintext highlighter-rouge">seL4_Word syndrome_0</code>, which holds the global fault syndrome 0 of the SMMU,                 <code class="language-plaintext highlighter-rouge">seL4_Word syndrome_1</code>, which holds the global fault syndrome 1 of the SMMU,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="get-sid">Get SID</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_SIDControl_GetSID</code></p>

<p>Create a SID capability.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>A SIDControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">sid</code></td>
      <td>The SID that you want this capability to manage.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">sid</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An SID capability for <code class="language-plaintext highlighter-rouge">sid</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_arm_vcpu">seL4_ARM_VCPU</h3>

<h4 id="acknowledge-virtual-ppi-irq">Acknowledge Virtual PPI IRQ</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VCPU_AckVPPI</code></p>

<p>Acknowledge a PPI IRQ previously forwarded from a VPPIEvent fault.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the VCPU being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>irq to ack.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">irq</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Acknowledge and unmask the PPI interrupt so that further interrupts can be forwarded through VPPIEvent faults.</p>

<h4 id="inject-irq">Inject IRQ</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VCPU_InjectIRQ</code></p>

<p>Inject an IRQ to a virtual CPU.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the VCPU being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint16</code></td>
      <td><code class="language-plaintext highlighter-rouge">virq</code></td>
      <td>Virtual IRQ ID</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">priority</code></td>
      <td>Priority of the IRQ to be injected</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">group</code></td>
      <td>IRQ group</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>VGIC list register</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  is in use and not yet handled by the guest.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">virq</code>, <code class="language-plaintext highlighter-rouge">priority</code>, <code class="language-plaintext highlighter-rouge">group</code>, or <code class="language-plaintext highlighter-rouge">index</code>  is invalid.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Used to queue IRQs towards the VCPU. Writes <code class="language-plaintext highlighter-rouge">ICH_LRn_EL2</code> for GICv3 or <code class="language-plaintext highlighter-rouge">LRn</code> for GICv2, where <code class="language-plaintext highlighter-rouge">n</code> is determined by <code class="language-plaintext highlighter-rouge">index</code>. The list register becomes available again when the guest acknowledges the injected interrupt.</p>

<h4 id="read-registers-1">Read Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_ARM_VCPU_ReadRegs_t seL4_ARM_VCPU_ReadRegs</code></p>

<p>Read a virtual CPU register.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the VCPU being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_VCPUReg</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Register to read from a VCPU</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU_ReadRegs_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word value</code>, which holds the value of the system register,                 and <code class="language-plaintext highlighter-rouge">int error</code>, which will be non-zero when an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">field</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Provides a way to read EL1 system registers, as well as <code class="language-plaintext highlighter-rouge">VMPIDR_EL2</code>.</p>

<h4 id="set-tcb-1">Set TCB</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VCPU_SetTCB</code></p>

<p>Bind a TCB to a virtual CPU.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the VCPU being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_TCB</code></td>
      <td><code class="language-plaintext highlighter-rouge">tcb</code></td>
      <td>Capability to TCB to bind to a virtual CPU</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">tcb</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> There is a 1:1 relationship between a virtual CPU and a TCB. If either (or both) of them is associated with another one, they will be dissociated, and then associated to the ones called in this system calls.</p>

<h4 id="write-registers-2">Write Registers</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VCPU_WriteRegs</code></p>

<p>Write a virtual CPU register.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VCPU</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the VCPU being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_VCPUReg</code></td>
      <td><code class="language-plaintext highlighter-rouge">field</code></td>
      <td>Register ID to write to a VCPU</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">value</code></td>
      <td>Value to be written to the VCPU register</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">field</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Provides a way to write EL1 system registers, as well as <code class="language-plaintext highlighter-rouge">VMPIDR_EL2</code>.</p>
<h3 id="sel4_irqcontrol-2">seL4_IRQControl</h3>

<h4 id="get-irq-handler-smp">Get IRQ Handler (SMP)</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_GetTriggerCore</code></p>

<p>Create an IRQ handler capability and specify the trigger method (edge or level) and the target core.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>The IRQ that you want this capability to handle.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">trigger</code></td>
      <td>Indicates whether this IRQ is edge (1) or level (0) triggered.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">target</code></td>
      <td>Indicates the target core ID to which this IRQ will be sent.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, SMP support is not enabled.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">target</code>  is invalid.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">irq</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h4 id="get-irq-handler-with-trigger-type">Get IRQ Handler with Trigger Type</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_GetTrigger</code></p>

<p>Create an IRQ handler capability and specify the trigger method (edge or level).</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>The IRQ that you want this capability to handle.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">trigger</code></td>
      <td>Indicates whether this IRQ is edge (1) or level (0) triggered.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the platform does not support setting the IRQ trigger.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">irq</code>  is invalid. Or, <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">irq</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h3 id="aarch32-specific-object-methods">Aarch32-Specific Object Methods</h3>
<h3 id="sel4_arm_pagedirectory">seL4_ARM_PageDirectory</h3>

<h4 id="clean-data-1">Clean Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageDirectory_Clean_Data</code></p>

<p>Clean cached pages within a page directory</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">start</code>  or <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="clean-and-invalidate-data-1">Clean and Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageDirectory_CleanInvalidate_Data</code></p>

<p>Clean and invalidate cached pages within a page directory</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">start</code>  or <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="invalidate-data-1">Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageDirectory_Invalidate_Data</code></p>

<p>Invalidate cached pages within a page directory</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">start</code>  or <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="unify-instruction-1">Unify Instruction</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_PageDirectory_Unify_Instruction</code></p>

<p>Clean and invalidate cached instruction pages to point of unification</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_PageDirectory</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page directory being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">start</code>  or <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h3 id="aarch64-specific-object-methods">Aarch64-Specific Object Methods</h3>
<h3 id="sel4_arm_smc">seL4_ARM_SMC</h3>

<h4 id="smc-call">SMC Call</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_SMC_Call</code></p>

<p>Tell the kernel to make the real SMC call.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SMC</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to allow threads to make Secure Monitor Calls.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SMCContext *</code></td>
      <td><code class="language-plaintext highlighter-rouge">smc_args</code></td>
      <td>The structure that has the provided arguments.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_SMCContext *</code></td>
      <td><code class="language-plaintext highlighter-rouge">smc_response</code></td>
      <td>The structure to capture the responses.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<p><strong>Description:</strong> Takes x0-x7 as arguments to an SMC call which are defined as a seL4_ARM_SMCContext struct. The kernel makes the SMC call and then returns the results as a new seL4_ARM_SMCContext.</p>
<h3 id="sel4_arm_vspace">seL4_ARM_VSpace</h3>

<h4 id="clean-data-2">Clean Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VSpace_Clean_Data</code></p>

<p>Clean cached pages within a top level translation table</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the top level translation table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="clean-and-invalidate-data-2">Clean and Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VSpace_CleanInvalidate_Data</code></p>

<p>Clean and invalidate cached pages within a top level translation table</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the top level translation table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="invalidate-data-2">Invalidate Data</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VSpace_Invalidate_Data</code></p>

<p>Invalidate cached pages within a top level translation table</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the top level translation table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h4 id="unify-instruction-2">Unify Instruction</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_ARM_VSpace_Unify_Instruction</code></p>

<p>Clean and invalidate cached instruction pages to point of unification</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_ARM_VSpace</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the top level translation table being operated on.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">start</code></td>
      <td>Start address</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">end</code></td>
      <td>End address</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">end</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">start</code>  is greater than or equal to <code class="language-plaintext highlighter-rouge">end</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The specified range crosses a page boundary.</td>
    </tr>
  </tbody>
</table>

<h2 id="riscv-specific-object-methods">RISCV-Specific Object Methods</h2>
<hr />

<h3 id="sel4_irqcontrol-3">seL4_IRQControl</h3>

<h4 id="get-irq-handler-with-trigger-type-1">Get IRQ Handler with Trigger Type</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_IRQControl_GetTrigger</code></p>

<p>Create an IRQ handler capability and specify the trigger method (edge or level).</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IRQControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>An IRQControl capability. This gives you the authority to make this call.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">irq</code></td>
      <td>The IRQ that you want this capability to handle.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">trigger</code></td>
      <td>Indicates whether this IRQ is edge (1) or level (0) triggered.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type. Or, the platform does not support setting the IRQ trigger.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">irq</code>  is invalid. Or, <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>An IRQ handler capability for <code class="language-plaintext highlighter-rouge">irq</code>  has already been created.</td>
    </tr>
  </tbody>
</table>

<h3 id="sel4_riscv_asidcontrol">seL4_RISCV_ASIDControl</h3>

<h4 id="make-pool-2">Make Pool</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_ASIDControl_MakePool</code></p>

<p>Create an ASID Pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_ASIDControl</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The master ASIDControl capability to invoke.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Untyped</code></td>
      <td><code class="language-plaintext highlighter-rouge">untyped</code></td>
      <td>Capability to an untyped memory object that will become the pool. Must be 4K bytes.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CNode</code></td>
      <td><code class="language-plaintext highlighter-rouge">root</code></td>
      <td>CPtr to the CNode that forms the root of the destination CSpace. Must be at a depth equivalent to the wordsize.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">index</code></td>
      <td>CPtr to the destination slot. Resolved from the root of the destination CSpace.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Uint8</code></td>
      <td><code class="language-plaintext highlighter-rouge">depth</code></td>
      <td>Number of bits of index to resolve to find the destination slot.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>The destination slot contains a capability. Or, there are no more ASID pools available.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">index</code>  or <code class="language-plaintext highlighter-rouge">depth</code>  is invalid . Or, <code class="language-plaintext highlighter-rouge">root</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">untyped</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is not the exact size of an ASID pool object. Or, <code class="language-plaintext highlighter-rouge">untyped</code>  is a device untyped .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RangeError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">depth</code>  is invalid .</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">untyped</code>  has been used to retype an object. Or, a copy of the <code class="language-plaintext highlighter-rouge">untyped</code>  capability exists.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Together with a capability to <code class="language-plaintext highlighter-rouge">Untyped Memory</code>, which is passed as an argument, create an <code class="language-plaintext highlighter-rouge">ASID Pool</code>. The untyped capability must represent a 4K memory object. This will create an ASID pool with enough space for 1024 VSpaces.</p>
<h3 id="sel4_riscv_asidpool">seL4_RISCV_ASIDPool</h3>

<h4 id="assign-1">Assign</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_ASIDPool_Assign</code></p>

<p>Assign an ASID Pool.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_ASIDPool</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>The ASID Pool capability to invoke, which must be to an ASID pool that is not full.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CPtr</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>The top-level <code class="language-plaintext highlighter-rouge">PageTable</code>  that is being assigned to an ASID pool. Must not already be assigned to an ASID pool.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>There are no more ASIDs available in <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is already assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Assigns an ASID to the VSpace passed in as an argument.</p>
<h3 id="sel4_riscv_page">seL4_RISCV_Page</h3>

<h4 id="get-address-2">Get Address</h4>
<p><code class="language-plaintext highlighter-rouge">static inline seL4_RISCV_Page_GetAddress_t seL4_RISCV_Page_GetAddress</code></p>

<p>Get the physical address of a page.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page to invoke.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A <code class="language-plaintext highlighter-rouge">seL4_RISCV_Page_GetAddress_t</code> struct that contains a                 <code class="language-plaintext highlighter-rouge">seL4_Word paddr</code>, which holds the physical address of the page,                 and <code class="language-plaintext highlighter-rouge">int error</code>.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<h4 id="map-11">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_Page_Map</code></p>

<p>Map a page into a page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page to invoke.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>VSpace to map the page into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address at which to map the page.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_CapRights_t</code></td>
      <td><code class="language-plaintext highlighter-rouge">rights</code></td>
      <td>Rights for the mapping.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM Attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_AlignmentError</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is not aligned to the page size of <code class="language-plaintext highlighter-rouge">_service</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A mapping already exists in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  does not have a paging structure at the required level mapped at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in <code class="language-plaintext highlighter-rouge">vspace</code>  at a different virtual address. Or, <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not the root of a VSpace. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a different VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Takes a VSpace, or top-level <code class="language-plaintext highlighter-rouge">Page Table</code>, capability as an argument and installs a reference to the given <code class="language-plaintext highlighter-rouge">Page</code> in the page table slot corresponding to the given address. If a page is already mapped at the same virtual address, update the mapping attributes. If the required paging structures are not present this operation will fail, returning a seL4_FailedLookup error.</p>

<h4 id="unmap-11">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_Page_Unmap</code></p>

<p>Unmap a page.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_Page</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page to invoke.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Removes an existing mapping.</p>
<h3 id="sel4_riscv_pagetable">seL4_RISCV_PageTable</h3>

<h4 id="map-12">Map</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_PageTable_Map</code></p>

<p>Map a page table at a specific virtual address.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table to invoke.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">vspace</code></td>
      <td>VSpace to map the lower-level page table into.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_Word</code></td>
      <td><code class="language-plaintext highlighter-rouge">vaddr</code></td>
      <td>Virtual address at which to map the page table.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_VMAttributes</code></td>
      <td><code class="language-plaintext highlighter-rouge">attr</code></td>
      <td>VM Attributes for the mapping.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_DeleteFirst</code></td>
      <td>A page is mapped in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>. Or, all required page tables are already mapped in <code class="language-plaintext highlighter-rouge">vspace</code>  at <code class="language-plaintext highlighter-rouge">vaddr</code>.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_FailedLookup</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidArgument</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">vaddr</code>  is in the kernel virtual address range.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  or <code class="language-plaintext highlighter-rouge">vspace</code>  is a CPtr to a capability of the wrong type. Or, <code class="language-plaintext highlighter-rouge">vspace</code>  is not assigned to an ASID pool. Or, <code class="language-plaintext highlighter-rouge">_service</code>  is already mapped in a VSpace.</td>
    </tr>
  </tbody>
</table>

<p><strong>Description:</strong> Starting from the VSpace, map the page table object at any unpopulated level for the provided virtual address. If all paging structures and mappings are present for this virtual address, return an seL4_DeleteFirst error.</p>

<h4 id="unmap-12">Unmap</h4>
<p><code class="language-plaintext highlighter-rouge">static inline int seL4_RISCV_PageTable_Unmap</code></p>

<p>Unmap a page table.</p>

<table>
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RISCV_PageTable</code></td>
      <td><code class="language-plaintext highlighter-rouge">_service</code></td>
      <td>Capability to the page table to invoke.</td>
    </tr>
  </tbody>
</table>

<p><strong>Return value:</strong> A return value of <code class="language-plaintext highlighter-rouge">0</code> indicates success. A non-zero value indicates that an error occurred.</p>

<table>
  <thead>
    <tr>
      <th>Error Code</th>
      <th>Possible Cause</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_IllegalOperation</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_InvalidCapability</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is a CPtr to a capability of the wrong type.</td>
    </tr>
    <tr>
      <td><code class="language-plaintext highlighter-rouge">seL4_RevokeFirst</code></td>
      <td>The <code class="language-plaintext highlighter-rouge">_service</code>  is the root of a VSpace. Or, a copy of the <code class="language-plaintext highlighter-rouge">_service</code>  capability exists.</td>
    </tr>
  </tbody>
</table>


  </div>

  
<div class="sidebar-toc hidden-xs hidden-sm col-md-3 col-lg-3">
    <ul id="toc" class="section-nav">
<li class="toc-entry toc-h2"><a href="#system-calls">System Calls</a>
<ul>
<li class="toc-entry toc-h3"><a href="#general-system-calls">General System Calls</a></li>
<li class="toc-entry toc-h3"><a href="#send">Send</a></li>
<li class="toc-entry toc-h3"><a href="#recv">Recv</a></li>
<li class="toc-entry toc-h3"><a href="#call">Call</a></li>
<li class="toc-entry toc-h3"><a href="#reply">Reply</a></li>
<li class="toc-entry toc-h3"><a href="#non-blocking-send">Non-Blocking Send</a></li>
<li class="toc-entry toc-h3"><a href="#reply-recv">Reply Recv</a></li>
<li class="toc-entry toc-h3"><a href="#non-blocking-recv">Non-Blocking Recv</a></li>
<li class="toc-entry toc-h3"><a href="#yield">Yield</a></li>
<li class="toc-entry toc-h3"><a href="#signal">Signal</a></li>
<li class="toc-entry toc-h3"><a href="#wait">Wait</a></li>
<li class="toc-entry toc-h3"><a href="#poll">Poll</a></li>
<li class="toc-entry toc-h3"><a href="#debugging-system-calls">Debugging System Calls</a></li>
<li class="toc-entry toc-h3"><a href="#put-char">Put Char</a></li>
<li class="toc-entry toc-h3"><a href="#dump-scheduler">Dump Scheduler</a></li>
<li class="toc-entry toc-h3"><a href="#halt">Halt</a></li>
<li class="toc-entry toc-h3"><a href="#snapshot">Snapshot</a></li>
<li class="toc-entry toc-h3"><a href="#cap-identify">Cap Identify</a></li>
<li class="toc-entry toc-h3"><a href="#name-thread">Name Thread</a></li>
<li class="toc-entry toc-h3"><a href="#send-sgi-0-15">Send SGI 0-15</a></li>
<li class="toc-entry toc-h3"><a href="#run">Run</a></li>
<li class="toc-entry toc-h3"><a href="#benchmarking-system-calls">Benchmarking System Calls</a></li>
<li class="toc-entry toc-h3"><a href="#reset-log">Reset Log</a></li>
<li class="toc-entry toc-h3"><a href="#finalize-log">Finalize Log</a></li>
<li class="toc-entry toc-h3"><a href="#set-log-buffer">Set Log Buffer</a></li>
<li class="toc-entry toc-h3"><a href="#null-syscall">Null Syscall</a></li>
<li class="toc-entry toc-h3"><a href="#flush-caches">Flush Caches</a></li>
<li class="toc-entry toc-h3"><a href="#flush-l1-caches">Flush L1 Caches</a></li>
<li class="toc-entry toc-h3"><a href="#get-thread-utilisation">Get Thread Utilisation</a></li>
<li class="toc-entry toc-h3"><a href="#reset-thread-utilisation">Reset Thread Utilisation</a></li>
<li class="toc-entry toc-h3"><a href="#dump-all-threads-utilisation">Dump All Threads Utilisation</a></li>
<li class="toc-entry toc-h3"><a href="#reset-all-threads-utilisation">Reset All Threads Utilisation</a></li>
<li class="toc-entry toc-h3"><a href="#x86-system-calls">X86 System Calls</a></li>
<li class="toc-entry toc-h3"><a href="#vm-enter">VM Enter</a></li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#architecture-independent-object-methods">Architecture-Independent Object Methods</a>
<ul>
<li class="toc-entry toc-h3"><a href="#sel4_cnode">seL4_CNode</a>
<ul>
<li class="toc-entry toc-h4"><a href="#cancel-badged-sends">Cancel Badged Sends</a></li>
<li class="toc-entry toc-h4"><a href="#copy">Copy</a></li>
<li class="toc-entry toc-h4"><a href="#delete">Delete</a></li>
<li class="toc-entry toc-h4"><a href="#mint">Mint</a></li>
<li class="toc-entry toc-h4"><a href="#move">Move</a></li>
<li class="toc-entry toc-h4"><a href="#mutate">Mutate</a></li>
<li class="toc-entry toc-h4"><a href="#revoke">Revoke</a></li>
<li class="toc-entry toc-h4"><a href="#rotate">Rotate</a></li>
<li class="toc-entry toc-h4"><a href="#save-caller">Save Caller</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_domainset">seL4_DomainSet</a>
<ul>
<li class="toc-entry toc-h4"><a href="#set">Set</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_irqcontrol">seL4_IRQControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-irq-handler">Get IRQ Handler</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_irqhandler">seL4_IRQHandler</a>
<ul>
<li class="toc-entry toc-h4"><a href="#acknowledge">Acknowledge</a></li>
<li class="toc-entry toc-h4"><a href="#clear">Clear</a></li>
<li class="toc-entry toc-h4"><a href="#set-notification">Set Notification</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_schedcontext-mcs">seL4_SchedContext (MCS)</a>
<ul>
<li class="toc-entry toc-h4"><a href="#bind">Bind</a></li>
<li class="toc-entry toc-h4"><a href="#consumed">Consumed</a></li>
<li class="toc-entry toc-h4"><a href="#unbind-object">Unbind Object</a></li>
<li class="toc-entry toc-h4"><a href="#unbind">Unbind</a></li>
<li class="toc-entry toc-h4"><a href="#yield-to">Yield To</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_schedcontrol-mcs">seL4_SchedControl (MCS)</a>
<ul>
<li class="toc-entry toc-h4"><a href="#configure-flags">Configure Flags</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_tcb">seL4_TCB</a>
<ul>
<li class="toc-entry toc-h4"><a href="#bind-notification">Bind Notification</a></li>
<li class="toc-entry toc-h4"><a href="#configure-single-stepping">Configure Single Stepping</a></li>
<li class="toc-entry toc-h4"><a href="#configure">Configure</a></li>
<li class="toc-entry toc-h4"><a href="#copy-registers">Copy Registers</a></li>
<li class="toc-entry toc-h4"><a href="#get-breakpoint">Get Breakpoint</a></li>
<li class="toc-entry toc-h4"><a href="#read-registers">Read Registers</a></li>
<li class="toc-entry toc-h4"><a href="#resume">Resume</a></li>
<li class="toc-entry toc-h4"><a href="#set-breakpoint">Set Breakpoint</a></li>
<li class="toc-entry toc-h4"><a href="#set-cpu-affinity">Set CPU Affinity</a></li>
<li class="toc-entry toc-h4"><a href="#set-ipc-buffer">Set IPC Buffer</a></li>
<li class="toc-entry toc-h4"><a href="#set-maximum-controlled-priority">Set Maximum Controlled Priority</a></li>
<li class="toc-entry toc-h4"><a href="#set-priority">Set Priority</a></li>
<li class="toc-entry toc-h4"><a href="#set-sched-params">Set Sched Params</a></li>
<li class="toc-entry toc-h4"><a href="#set-space">Set Space</a></li>
<li class="toc-entry toc-h4"><a href="#set-tls-base">Set TLS Base</a></li>
<li class="toc-entry toc-h4"><a href="#suspend">Suspend</a></li>
<li class="toc-entry toc-h4"><a href="#unbind-notification">Unbind Notification</a></li>
<li class="toc-entry toc-h4"><a href="#unset-breakpoint">Unset Breakpoint</a></li>
<li class="toc-entry toc-h4"><a href="#write-registers">Write Registers</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_tcb-mcs">seL4_TCB (MCS)</a>
<ul>
<li class="toc-entry toc-h4"><a href="#configure-mcs">Configure (MCS)</a></li>
<li class="toc-entry toc-h4"><a href="#set-sched-params-mcs">Set Sched Params (MCS)</a></li>
<li class="toc-entry toc-h4"><a href="#set-space-mcs">Set Space (MCS)</a></li>
<li class="toc-entry toc-h4"><a href="#set-timeout-endpoint">Set Timeout Endpoint</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_untyped">seL4_Untyped</a>
<ul>
<li class="toc-entry toc-h4"><a href="#retype">Retype</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#x86-specific-object-methods">x86-Specific Object Methods</a>
<ul>
<li class="toc-entry toc-h3"><a href="#general-x86-object-methods">General x86 Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#sel4_irqcontrol-1">seL4_IRQControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-io-apic-handler">Get I/O APIC Handler</a></li>
<li class="toc-entry toc-h4"><a href="#get-msi-handler">Get MSI Handler</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_tcb-1">seL4_TCB</a>
<ul>
<li class="toc-entry toc-h4"><a href="#set-ept-root">Set EPT Root</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_asidcontrol">seL4_X86_ASIDControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#make-pool">Make Pool</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_asidpool">seL4_X86_ASIDPool</a>
<ul>
<li class="toc-entry toc-h4"><a href="#assign">Assign</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_eptpd">seL4_X86_EPTPD</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_eptpdpt">seL4_X86_EPTPDPT</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-1">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-1">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_eptpt">seL4_X86_EPTPT</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-2">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-2">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_iopagetable">seL4_X86_IOPageTable</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-3">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-3">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_ioport">seL4_X86_IOPort</a>
<ul>
<li class="toc-entry toc-h4"><a href="#in16">In16</a></li>
<li class="toc-entry toc-h4"><a href="#in32">In32</a></li>
<li class="toc-entry toc-h4"><a href="#in8">In8</a></li>
<li class="toc-entry toc-h4"><a href="#out16">Out16</a></li>
<li class="toc-entry toc-h4"><a href="#out32">Out32</a></li>
<li class="toc-entry toc-h4"><a href="#out8">Out8</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_ioportcontrol">seL4_X86_IOPortControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#issue">Issue</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_page">seL4_X86_Page</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-address">Get Address</a></li>
<li class="toc-entry toc-h4"><a href="#map-ept">Map EPT</a></li>
<li class="toc-entry toc-h4"><a href="#map-io">Map I/O</a></li>
<li class="toc-entry toc-h4"><a href="#map-4">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-4">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_pagedirectory">seL4_X86_PageDirectory</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-status-bits">Get Status Bits</a></li>
<li class="toc-entry toc-h4"><a href="#map-5">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-5">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_pagetable">seL4_X86_PageTable</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-6">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-6">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_vcpu">seL4_X86_VCPU</a>
<ul>
<li class="toc-entry toc-h4"><a href="#disable-io-port">Disable I/O Port</a></li>
<li class="toc-entry toc-h4"><a href="#enable-io-port">Enable I/O Port</a></li>
<li class="toc-entry toc-h4"><a href="#read-vmcs">Read VMCS</a></li>
<li class="toc-entry toc-h4"><a href="#set-tcb">Set TCB</a></li>
<li class="toc-entry toc-h4"><a href="#write-registers-1">Write Registers</a></li>
<li class="toc-entry toc-h4"><a href="#write-vmcs">Write VMCS</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#ia32-specific-object-methods">IA32-Specific Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#x86_64-specific-object-methods">x86_64-Specific Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_pdpt">seL4_X86_PDPT</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-7">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-7">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_x86_vcpu-1">seL4_X86_VCPU</a>
<ul>
<li class="toc-entry toc-h4"><a href="#read-msr">Read MSR</a></li>
<li class="toc-entry toc-h4"><a href="#write-msr">Write MSR</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#arm-specific-object-methods">ARM-Specific Object Methods</a>
<ul>
<li class="toc-entry toc-h3"><a href="#general-arm-object-methods">General ARM Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_asidcontrol">seL4_ARM_ASIDControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#make-pool-1">Make Pool</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_asidpool">seL4_ARM_ASIDPool</a>
<ul>
<li class="toc-entry toc-h4"><a href="#asid-pool-assign">ASID Pool Assign</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_cb">seL4_ARM_CB</a>
<ul>
<li class="toc-entry toc-h4"><a href="#assign-vspace">Assign VSpace</a></li>
<li class="toc-entry toc-h4"><a href="#cb-clear-fault">CB Clear Fault</a></li>
<li class="toc-entry toc-h4"><a href="#cb-get-fault">CB Get Fault</a></li>
<li class="toc-entry toc-h4"><a href="#tlb-invalidate">TLB Invalidate</a></li>
<li class="toc-entry toc-h4"><a href="#unassign-vspace">Unassign VSpace</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_cbcontrol">seL4_ARM_CBControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-cb">Get CB</a></li>
<li class="toc-entry toc-h4"><a href="#tlb-invalidate-all">TLB Invalidate All</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_iopagetable">seL4_ARM_IOPageTable</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-8">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-8">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_page">seL4_ARM_Page</a>
<ul>
<li class="toc-entry toc-h4"><a href="#clean-data">Clean Data</a></li>
<li class="toc-entry toc-h4"><a href="#clean-and-invalidate-data">Clean and Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#get-address-1">Get Address</a></li>
<li class="toc-entry toc-h4"><a href="#invalidate-data">Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#map-io-1">Map I/O</a></li>
<li class="toc-entry toc-h4"><a href="#map-9">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unify-instruction">Unify Instruction</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-9">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_pagetable">seL4_ARM_PageTable</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-10">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-10">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_sid">seL4_ARM_SID</a>
<ul>
<li class="toc-entry toc-h4"><a href="#bind-cb">Bind CB</a></li>
<li class="toc-entry toc-h4"><a href="#unbind-cb">Unbind CB</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_sidcontrol">seL4_ARM_SIDControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#clear-fault">Clear Fault</a></li>
<li class="toc-entry toc-h4"><a href="#get-fault">Get Fault</a></li>
<li class="toc-entry toc-h4"><a href="#get-sid">Get SID</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_vcpu">seL4_ARM_VCPU</a>
<ul>
<li class="toc-entry toc-h4"><a href="#acknowledge-virtual-ppi-irq">Acknowledge Virtual PPI IRQ</a></li>
<li class="toc-entry toc-h4"><a href="#inject-irq">Inject IRQ</a></li>
<li class="toc-entry toc-h4"><a href="#read-registers-1">Read Registers</a></li>
<li class="toc-entry toc-h4"><a href="#set-tcb-1">Set TCB</a></li>
<li class="toc-entry toc-h4"><a href="#write-registers-2">Write Registers</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_irqcontrol-2">seL4_IRQControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-irq-handler-smp">Get IRQ Handler (SMP)</a></li>
<li class="toc-entry toc-h4"><a href="#get-irq-handler-with-trigger-type">Get IRQ Handler with Trigger Type</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#aarch32-specific-object-methods">Aarch32-Specific Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_pagedirectory">seL4_ARM_PageDirectory</a>
<ul>
<li class="toc-entry toc-h4"><a href="#clean-data-1">Clean Data</a></li>
<li class="toc-entry toc-h4"><a href="#clean-and-invalidate-data-1">Clean and Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#invalidate-data-1">Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#unify-instruction-1">Unify Instruction</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#aarch64-specific-object-methods">Aarch64-Specific Object Methods</a></li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_smc">seL4_ARM_SMC</a>
<ul>
<li class="toc-entry toc-h4"><a href="#smc-call">SMC Call</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_arm_vspace">seL4_ARM_VSpace</a>
<ul>
<li class="toc-entry toc-h4"><a href="#clean-data-2">Clean Data</a></li>
<li class="toc-entry toc-h4"><a href="#clean-and-invalidate-data-2">Clean and Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#invalidate-data-2">Invalidate Data</a></li>
<li class="toc-entry toc-h4"><a href="#unify-instruction-2">Unify Instruction</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#riscv-specific-object-methods">RISCV-Specific Object Methods</a>
<ul>
<li class="toc-entry toc-h3"><a href="#sel4_irqcontrol-3">seL4_IRQControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-irq-handler-with-trigger-type-1">Get IRQ Handler with Trigger Type</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_riscv_asidcontrol">seL4_RISCV_ASIDControl</a>
<ul>
<li class="toc-entry toc-h4"><a href="#make-pool-2">Make Pool</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_riscv_asidpool">seL4_RISCV_ASIDPool</a>
<ul>
<li class="toc-entry toc-h4"><a href="#assign-1">Assign</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_riscv_page">seL4_RISCV_Page</a>
<ul>
<li class="toc-entry toc-h4"><a href="#get-address-2">Get Address</a></li>
<li class="toc-entry toc-h4"><a href="#map-11">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-11">Unmap</a></li>
</ul>
</li>
<li class="toc-entry toc-h3"><a href="#sel4_riscv_pagetable">seL4_RISCV_PageTable</a>
<ul>
<li class="toc-entry toc-h4"><a href="#map-12">Map</a></li>
<li class="toc-entry toc-h4"><a href="#unmap-12">Unmap</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>

</div>

    </main>
    


<footer class="site-footer">

  <h2 class="footer-heading">seL4 docs</h2>

  <div class="footer-col-wrapper">

    <div class="col-md-2">
      



<ul class="social-media-list">
  <li><a href="https://github.com/sel4"><i class="fab fa-github"></i> <span class="username">sel4</span></a></li><li><a href="https://github.com/sel4proj"><i class="fab fa-github"></i> <span class="username">sel4proj</span></a></li>
</ul>

    </div>

    <div class="col-md-8">
      <ul class="list-unstyled">
        <li>
          This site is for displaying seL4 related documentation.  Pull requests are welcome.
        </li>
        
          <li>
            Site last updated: Fri Feb 7 10:17:38 2025 +1100 ee78c8857c
          </li>
          <li>
                Page last updated: Mon Nov 30 09:25:37 2020 +1100 977ed44f17
          </li>
        
      </ul>
    </div>
    <div class="col-md-2">
<a href="https://github.com/seL4/docs/blob/master/projects/sel4/api-doc.md">View page on GitHub</a>
      <br />
      <a href="https://github.com/seL4/docs/edit/master/projects/sel4/api-doc.md">Edit page on GitHub</a>
      <br />
      <a href="/sitemap">Sitemap</a>
    </div>

  </div>

</footer>

  </body>
</html>
